From: Leonardo Florez-Valencia Date: Wed, 2 Nov 2016 03:52:47 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~67 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=47b6ec1790c1c9cb9c8396168e73f1c9f3c764bc;p=cpPlugins.git ... --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d1dc9ed..ad24e39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,24 +48,6 @@ IF(USE_QT4) ENDIF(USE_QT4) INCLUDE(cmake/Functions.cmake) -## =========================== -## == Use all valid subdirs == -## =========================== - -#SET( -# _include_dirs -# . -# lib -# lib/Itk2Vtk -# lib/Instances -# ) -#FOREACH(_dir ${_include_dirs}) -# INCLUDE_DIRECTORIES( -# ${PROJECT_SOURCE_DIR}/${_dir} -# ${PROJECT_BINARY_DIR}/${_dir} -# ) -#ENDFOREACH(_dir) - ## =========================== ## == Build different parts == ## =========================== diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index 01bd598..02ec213 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -193,6 +193,13 @@ IF(_srcs) EXPORT_FILE_NAME ${lib_name}_Export.h STATIC_DEFINE ${lib_name}_BUILT_AS_STATIC ) + IF(${prj_NAME}_All_Headers) + SET(_hdr_tmp "${${prj_NAME}_All_Headers};${_hdrs}") + ELSE(${prj_NAME}_All_Headers) + SET(_hdr_tmp "${_hdrs}") + ENDIF(${prj_NAME}_All_Headers) + LIST(REMOVE_DUPLICATES _hdr_tmp) + SET(${prj_NAME}_All_Headers ${_hdr_tmp} CACHE INTERNAL "All headers." FORCE) ENDIF(_srcs) ENDFUNCTION() diff --git a/cmake/cpPluginsConfig.cmake.in b/cmake/cpPluginsConfig.cmake.in index 4f79456..ab0456c 100644 --- a/cmake/cpPluginsConfig.cmake.in +++ b/cmake/cpPluginsConfig.cmake.in @@ -9,16 +9,13 @@ ENDIF("@Qt4_FOUND@" STREQUAL "TRUE") ## ==================== ## == Find libraries == ## ==================== -SET( - _all_libs - "@cpPlugins_tinyxml2_LIB@" - "@cpPlugins_QCustomPlot_LIB@" - "@cpExtensions_LIB@" - "@cpPlugins_LIB@" - "@cpBaseQtApplication_LIB@" - "@cpPlugins_Instances@" - ) -SET(cpPlugins_Instances "@cpPlugins_Instances@") + +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}) @@ -50,15 +47,63 @@ IF(_l_locations) LINK_DIRECTORIES(${_l_locations}) ENDIF(_l_locations) +## ============================== +## == Find include directories == +## ============================== + +#SET(cpPlugins_All_Headers "@cpPlugins_All_Headers@" CACHE STRING "Internal") +#MARK_AS_ADVANCED(FORCE cpPlugins_All_Headers) +#SET(_header_paths +# "@PROJECT_SOURCE_DIR@/lib" +# "@PROJECT_BINARY_DIR@/lib" +# "@PROJECT_SOURCE_DIR@/lib/Instances" +# "@PROJECT_BINARY_DIR@/lib/Instances" +# "@CMAKE_INSTALL_PREFIX@/include" +# ) +#FOREACH(_h ${cpPlugins_All_Headers}) +# GET_FILENAME_COMPONENT(_h_name ${_h} NAME) +# GET_FILENAME_COMPONENT(_h_dir ${_h} DIRECTORY) +# FIND_PATH( +# _loc_${_h_name} ${_h_name} +# HINTS +# ${_header_paths} +# ${_h_dir} +# ) +# IF(_loc_${_h_name}) +# LIST(APPEND _header_paths ${_loc_${_h_name}}) +# LIST(REMOVE_DUPLICATES _header_paths) +# ELSE(_loc_${_h_name}) +# MESSAGE(FATAL_ERROR "Please configure where is ${_h_name}") +# ENDIF(_loc_${_h_name}) +#ENDFOREACH(_h ${cpPlugins_All_Headers}) +#MESSAGE(STATUS ${_header_paths}) + +## 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_BINARY_DIR@/lib + @PROJECT_SOURCE_DIR@/lib/Instances + @PROJECT_BINARY_DIR@/lib/Instances + ) + ## ============================ ## == Find bash applications == ## ============================ SET( _exec_programs - "@cpPlugins_bash_BuildInstances_APP@" + "@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( @@ -82,39 +127,20 @@ FOREACH(_prog ${_exec_programs}) MARK_AS_ADVANCED(FORCE ${_prog}_APP) ENDFOREACH(_prog) -## ========================= -## == 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_BINARY_DIR@/lib - @PROJECT_SOURCE_DIR@/lib/Itk2Vtk - @PROJECT_BINARY_DIR@/lib/Itk2Vtk - @PROJECT_SOURCE_DIR@/lib/Instances - @PROJECT_BINARY_DIR@/lib/Instances - ) - ## ========================== ## == Configuration values == ## ========================== -SET(cpPlugins_NUMBER_OF_FILES @cpPlugins_NUMBER_OF_FILES@ CACHE STRING "Internal") -SET(cpPlugins_INTEGER_TYPES @cpPlugins_INTEGER_TYPES@ CACHE STRING "Internal") -SET(cpPlugins_REAL_TYPES @cpPlugins_REAL_TYPES@ CACHE STRING "Internal") -SET(cpPlugins_PROCESS_DIMENSIONS @cpPlugins_PROCESS_DIMENSIONS@ CACHE STRING "Internal") -SET(cpPlugins_VISUAL_DIMENSIONS @cpPlugins_VISUAL_DIMENSIONS@ CACHE STRING "Internal") +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_NUMBER_OF_FILES) -MARK_AS_ADVANCED(FORCE cpPlugins_INTEGER_TYPES) -MARK_AS_ADVANCED(FORCE cpPlugins_REAL_TYPES) -MARK_AS_ADVANCED(FORCE cpPlugins_PROCESS_DIMENSIONS) -MARK_AS_ADVANCED(FORCE cpPlugins_VISUAL_DIMENSIONS) +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$ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index f10db6b..0183e8e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -45,6 +45,29 @@ TARGET_LINK_LIBRARIES( CompileLibFromDir(cpBaseQtApplication SHARED cpBaseQtApplication) TARGET_LINK_LIBRARIES(cpBaseQtApplication cpPlugins) +## ==================== +## == Base libraries == +## ==================== + +IF(USE_QT4) + SET( + cpPlugins_BaseLibraries + cp_tinyxml2 + cp_QCustomPlot + cpExtensions + cpPlugins + CACHE INTERNAL "All locally compiled libraries." FORCE + ) +ELSE(USE_QT4) + SET( + cpPlugins_BaseLibraries + cp_tinyxml2 + cpExtensions + cpPlugins + CACHE INTERNAL "All locally compiled libraries." FORCE + ) +ENDIF(USE_QT4) + ## =================================== ## == Libraries to dynamically load == ## ===================================