]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Wed, 2 Nov 2016 03:52:47 +0000 (22:52 -0500)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Wed, 2 Nov 2016 03:52:47 +0000 (22:52 -0500)
CMakeLists.txt
cmake/Functions.cmake
cmake/cpPluginsConfig.cmake.in
lib/CMakeLists.txt

index d1dc9edefcf3cd2508043fa157506d017e699e24..ad24e393a265276eb1560cc3d790ea8e79132754 100644 (file)
@@ -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 ==
 ## ===========================
index 01bd59873e40b33e8315640e78d3862f5398e03d..02ec213e50c7334162861a890d6f6c3efd20c357 100644 (file)
@@ -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()
 
index 4f79456d9ccf96211a248c8c217105fe5cac392a..ab0456cc23a2a7b52bb3446b846c61a6b654b39c 100644 (file)
@@ -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$
index f10db6baea6d6623727d25687114a252a71bebfc..0183e8ea86b203c74114d1efe08976e195e95230 100644 (file)
@@ -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 ==
 ## ===================================