Browse Source

CTK_BASE_INCLUDE_DIRS has to be updated to generate CTKConfig.cmake

The recent changes related to the "include_deps" topic removed the variable
CTK_BASE_INCLUDE_DIRS.

Waiting we find a better way to collect the include dirs associated with
both the CTK libraries being built and the corresponding external project,
the update of CTK_BASE_INCLUDE_DIRS variable has been re-added.

Ideally, the following could be done:
 - Collect the include dirs associated with all CTK libraries
 - Collect the include dirs associated with External project if these
ones haven't been passed to CTK.
Jean-Christophe Fillion-Robin 14 years ago
parent
commit
2de135a0f8
2 changed files with 4 additions and 0 deletions
  1. 1 0
      CMake/ctkMacroBuildLib.cmake
  2. 3 0
      Utilities/LastConfigureStep/CMakeLists.txt

+ 1 - 0
CMake/ctkMacroBuildLib.cmake

@@ -151,6 +151,7 @@ MACRO(ctkMacroBuildLib)
   # Update CTK_BASE_LIBRARIES
   SET(CTK_BASE_LIBRARIES ${my_libs} ${lib_name} CACHE INTERNAL "CTK base libraries" FORCE)
   SET(CTK_LIBRARIES ${CTK_LIBRARIES} ${lib_name} CACHE INTERNAL "CTK libraries" FORCE)
+  SET(CTK_BASE_INCLUDE_DIRS ${CTK_BASE_INCLUDE_DIRS} ${my_includes} CACHE INTERNAL "CTK includes" FORCE)
   
   # Install headers
   FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")

+ 3 - 0
Utilities/LastConfigureStep/CMakeLists.txt

@@ -79,6 +79,9 @@ FOREACH(ctk_target_dependency ${ctk_target_dependencies})
   ENDIF()
 ENDFOREACH()
 
+# Clean variable
+LIST(REMOVE_DUPLICATES CTK_BASE_INCLUDE_DIRS)
+
 #-----------------------------------------------------------------------------
 # Create the CTKConfig.cmake file containing the CTK configuration.
 # Since it might generate configuration file depending