diff --git a/cmake_modules/Findcsm.cmake b/cmake_modules/Findcsm.cmake
index 938022e920cddb287f773480596ffe497d8a0306..7ad6ce1974a96153a652df1199f1ae7885ac8ed2 100644
--- a/cmake_modules/Findcsm.cmake
+++ b/cmake_modules/Findcsm.cmake
@@ -46,8 +46,8 @@ macro(csm_report_not_found REASON_MSG)
   # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by
   # FindPackage() use the camelcase library name, not uppercase.
   if (csm_FIND_QUIETLY)
-    message(STATUS "Failed to find csm- " ${REASON_MSG} ${ARGN})
-  else (csm_FIND_REQUIRED)
+    message(STATUS "Ignoring csm dependency - " ${REASON_MSG} ${ARGN})
+  elseif(csm_FIND_REQUIRED)
     message(FATAL_ERROR "Failed to find csm - " ${REASON_MSG} ${ARGN})
   else()
     # Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ee3f8e7da535c1964752088000607a9485bb91b1..52c93b5557f1f7e7dfbff40526e3a7516415793d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -73,7 +73,9 @@ SET(SRCS
   ENDIF(csm_FOUND)
 # create the shared library
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-target_link_libraries(${PROJECT_NAME} ${csm_LIBRARY})
+IF(csm_FOUND)
+  target_link_libraries(${PROJECT_NAME} ${csm_LIBRARY})
+ENDIF(csm_FOUND)
 
 #install library
 INSTALL(TARGETS ${PROJECT_NAME}