X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cmake%2FcpPluginsConfig.cmake.in;h=b6fad2d873b10a930e348dbff8602fbc2029c860;hb=ced860e96e5d2e10481582649664505396b0054d;hp=df933c79bec3f01c82ffe4cfc5ea3822e00985ba;hpb=baca951171acbeb593813e57755f2924af59f4fa;p=cpPlugins.git diff --git a/cmake/cpPluginsConfig.cmake.in b/cmake/cpPluginsConfig.cmake.in index df933c7..b6fad2d 100644 --- a/cmake/cpPluginsConfig.cmake.in +++ b/cmake/cpPluginsConfig.cmake.in @@ -1,49 +1,119 @@ -# =================================== -# -- Some configurations variables -- -# =================================== +## ================================ +## == Find cpPlugins-cmake tools == +## ================================ -SET(cpPlugins_with_QT4 "@QT4_FOUND@") +IF("@Qt4_FOUND@" STREQUAL "TRUE") + SET(USE_QT4 ON) +ENDIF("@Qt4_FOUND@" STREQUAL "TRUE") -# ========================= -# -- Include directories -- -# ========================= +## ==================== +## == Find libraries == +## ==================== +SET(cpPlugins_BaseLibraries "@cpPlugins_BaseLibraries@" CACHE STRING "Internal") +SET(cpPlugins_Instances "@cpPlugins_Instances@" CACHE STRING "Internal") +MARK_AS_ADVANCED(FORCE cpPlugins_BaseLibraries) +MARK_AS_ADVANCED(FORCE cpPlugins_Instances) + +SET(_all_libs ${cpPlugins_BaseLibraries} ${cpPlugins_Instances}) + +SET(_l_locations) +FOREACH(_l ${_all_libs}) + IF(MSVC) + FIND_LIBRARY( + ${_l}_LIB NAMES ${_l} + HINTS + @PROJECT_BINARY_DIR@/$(ConfigurationName) + @CMAKE_INSTALL_PREFIX@/bin + @CMAKE_INSTALL_PREFIX@/lib + ) + ELSE(MSVC) + FIND_LIBRARY( + ${_l}_LIB NAMES ${_l} + HINTS + @PROJECT_BINARY_DIR@ + @CMAKE_INSTALL_PREFIX@/bin + @CMAKE_INSTALL_PREFIX@/lib + ) + ENDIF(MSVC) + IF(${_l}_LIB) + MARK_AS_ADVANCED(FORCE ${_l}_LIB) + GET_FILENAME_COMPONENT(_dir ${${_l}_LIB} DIRECTORY) + LIST(APPEND _l_locations ${_dir}) + ENDIF(${_l}_LIB) +ENDFOREACH(_l) +IF(_l_locations) + LIST(REMOVE_DUPLICATES _l_locations) + LINK_DIRECTORIES(${_l_locations}) +ENDIF(_l_locations) + +## ============================== +## == Find include directories == +## ============================== + +## TODO: this is not completely correct!!! INCLUDE_DIRECTORIES( + @CMAKE_INSTALL_PREFIX@/include + @CMAKE_INSTALL_PREFIX@/include/cpPlugins/Itk2Vtk + @CMAKE_INSTALL_PREFIX@/include/cpPlugins/Instances + @PROJECT_SOURCE_DIR@ + @PROJECT_BINARY_DIR@ @PROJECT_SOURCE_DIR@/lib - @PROJECT_SOURCE_DIR@/lib/third_party - @PROJECT_SOURCE_DIR@/lib/third_party/ItkVtkGlue @PROJECT_BINARY_DIR@/lib - @PROJECT_BINARY_DIR@/lib/third_party - @PROJECT_BINARY_DIR@/lib/third_party/ItkVtkGlue - @CMAKE_INSTALL_PREFIX@/include - @CMAKE_INSTALL_PREFIX@/include/third_party - @CMAKE_INSTALL_PREFIX@/include/third_party/ItkVtkGlue + @PROJECT_SOURCE_DIR@/lib/Instances + @PROJECT_BINARY_DIR@/lib/Instances ) -# ========================= -# -- Library directories -- -# ========================= - -IF(MSVC) - LINK_DIRECTORIES( - @PROJECT_BINARY_DIR@/$(ConfigurationName) - @CMAKE_INSTALL_PREFIX@/bin - @CMAKE_INSTALL_PREFIX@/lib - ) -ELSE(MSVC) - LINK_DIRECTORIES( - @PROJECT_BINARY_DIR@ - @CMAKE_INSTALL_PREFIX@/bin - @CMAKE_INSTALL_PREFIX@/lib - ) -ENDIF(MSVC) - -# =================== -# -- Library names -- -# =================== - -SET(cpExtensions_LIBRARY cpExtensions) -SET(cpPlugins_Interface_LIBRARY cpPlugins_Interface) -SET(cpPlugins_LIBRARY cpPlugins) +## ============================ +## == Find bash applications == +## ============================ + +SET( + _exec_programs + "@cpPlugins_bash_CreateRealConfig_APP@" + "@cpPlugins_bash_CreateInstances_APP@" + "@cpPlugins_bash_CreateDemanglers_APP@" + "@cpPlugins_bash_CreatePlugins_APP@" + "@cpPlugins_bash_HostCreator_APP@" + ) + +FOREACH(_prog ${_exec_programs}) + IF(MSVC) + FIND_PROGRAM( + ${_prog}_APP + NAMES ${_prog} + HINTS /usr /usr/local + PATHS @CMAKE_INSTALL_PREFIX@/bin @PROJECT_BINARY_DIR@/$(ConfigurationName) + PATH_SUFFIXES bin sbin + DOC "Where is ${_prog}?" + ) + ELSE(MSVC) + FIND_PROGRAM( + ${_prog}_APP + NAMES ${_prog} + HINTS /usr /usr/local + PATHS @CMAKE_INSTALL_PREFIX@/bin @PROJECT_BINARY_DIR@ + PATH_SUFFIXES bin sbin + DOC "Where is ${_prog}?" + ) + ENDIF(MSVC) + MARK_AS_ADVANCED(FORCE ${_prog}_APP) +ENDFOREACH(_prog) + +## ========================== +## == Configuration values == +## ========================== + +SET(cpPlugins_CONFIG_NUMBER_OF_FILES @cpPlugins_CONFIG_NUMBER_OF_FILES@ CACHE STRING "Internal") +SET(cpPlugins_CONFIG_INTEGER_TYPES @cpPlugins_CONFIG_INTEGER_TYPES@ CACHE STRING "Internal") +SET(cpPlugins_CONFIG_REAL_TYPES @cpPlugins_CONFIG_REAL_TYPES@ CACHE STRING "Internal") +SET(cpPlugins_CONFIG_PROCESS_DIMENSIONS @cpPlugins_CONFIG_PROCESS_DIMENSIONS@ CACHE STRING "Internal") +SET(cpPlugins_CONFIG_VISUAL_DIMENSIONS @cpPlugins_CONFIG_VISUAL_DIMENSIONS@ CACHE STRING "Internal") + +MARK_AS_ADVANCED(FORCE cpPlugins_CONFIG_NUMBER_OF_FILES) +MARK_AS_ADVANCED(FORCE cpPlugins_CONFIG_INTEGER_TYPES) +MARK_AS_ADVANCED(FORCE cpPlugins_CONFIG_REAL_TYPES) +MARK_AS_ADVANCED(FORCE cpPlugins_CONFIG_PROCESS_DIMENSIONS) +MARK_AS_ADVANCED(FORCE cpPlugins_CONFIG_VISUAL_DIMENSIONS) ## eof - $RCSfile$