Skip to content
Snippets Groups Projects

After cmake and const refactor

Merged Joan Vallvé Navarro requested to merge devel into main
27 files
+ 356
458
Compare changes
  • Side-by-side
  • Inline
Files
27
+ 0
64
FIND_PATH(
csm_INCLUDE_DIR
NAMES algos.h
PATHS /usr/local/include/csm)
IF(csm_INCLUDE_DIR)
MESSAGE("Found csm include dirs: ${csm_INCLUDE_DIR}")
ELSE(csm_INCLUDE_DIR)
MESSAGE("Couldn't find csm include dirs")
ENDIF(csm_INCLUDE_DIR)
FIND_LIBRARY(
csm_LIBRARY
NAMES libcsm.so libcsm.dylib
PATHS /usr/local/lib)
IF(csm_LIBRARY)
MESSAGE("Found csm lib: ${csm_LIBRARY}")
ELSE(csm_LIBRARY)
MESSAGE("Couldn't find csm lib")
ENDIF(csm_LIBRARY)
IF (csm_INCLUDE_DIR AND csm_LIBRARY)
SET(csm_FOUND TRUE)
ELSE(csm_INCLUDE_DIR AND csm_LIBRARY)
set(csm_FOUND FALSE)
ENDIF (csm_INCLUDE_DIR AND csm_LIBRARY)
IF (csm_FOUND)
IF (NOT csm_FIND_QUIETLY)
MESSAGE(STATUS "Found csm: ${csm_LIBRARY}")
ENDIF (NOT csm_FIND_QUIETLY)
ELSE (csm_FOUND)
IF (csm_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find csm")
ENDIF (csm_FIND_REQUIRED)
ENDIF (csm_FOUND)
macro(csm_report_not_found REASON_MSG)
set(csm_FOUND FALSE)
unset(csm_INCLUDE_DIR)
unset(csm_LIBRARIES)
# Reset the CMake module path to its state when this script was called.
set(CMAKE_MODULE_PATH ${CALLERS_CMAKE_MODULE_PATH})
# 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})
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
# that prevents generation, but continues configuration.
message(SEND_ERROR "Failed to find csm - " ${REASON_MSG} ${ARGN})
endif ()
return()
endmacro(csm_report_not_found)
if(NOT csm_FOUND)
csm_report_not_found("Something went wrong while setting up csm.")
endif(NOT csm_FOUND)
# Set the include directories for csm (itself).
set(csm_FOUND TRUE)
\ No newline at end of file
Loading