Forráskód Böngészése

Enhance the build system to support external projects.

Sascha Zelzer 14 éve
szülő
commit
5a3d616e2f

+ 4 - 1
CTKConfig.cmake.in

@@ -73,11 +73,14 @@ SET(CTK_WRAPPED_LIBRARIES_PYTHONQT @CTK_WRAPPED_LIBRARIES_PYTHONQT@)
 
 @CTK_CONFIG_INSTALL_ONLY@
 
+# Library specific include directories
+@CTK_LIBRARY_INCLUDE_DIRS_CONFIG@
+
 # Plugin specific include directories
 @CTK_PLUGIN_INCLUDE_DIRS_CONFIG@
 
 # The CTK include file directories.
-SET(CTK_INCLUDE_DIRS "@CTK_INCLUDE_DIRS_CONFIG@")
+SET(CTK_INCLUDE_DIRS "@CTK_BUILD_DIR@;@CTK_INCLUDE_DIRS_CONFIG@")
  
 # The CTK library directories. Note that if
 # CTK_CONFIGURATION_TYPES is set (see below) then these directories

+ 1 - 0
CTKConfig.h.in

@@ -0,0 +1 @@
+#define CTK_PLUGIN_DIR "@CTK_BINARY_DIR@/bin/plugins/"

+ 11 - 0
Utilities/LastConfigureStep/CTKGenerateCTKConfig.cmake

@@ -85,6 +85,15 @@ FOREACH(plugin ${CTK_PLUGIN_LIBRARIES})
 SET(${plugin}_INCLUDE_DIRS \"${${plugin}_INCLUDE_DIRS}\")")
 ENDFOREACH()
 
+# Write a set of variables containing library specific include directories
+SET(CTK_LIBRARY_INCLUDE_DIRS_CONFIG)
+FOREACH(lib ${CTK_LIBRARIES})
+  SET(${lib}_INCLUDE_DIRS ${${lib}_SOURCE_DIR} ${${lib}_BINARY_DIR})
+  ctkFunctionGetIncludeDirs(${lib}_INCLUDE_DIRS ${lib})
+  SET(CTK_LIBRARY_INCLUDE_DIRS_CONFIG "${CTK_LIBRARY_INCLUDE_DIRS_CONFIG}
+SET(${lib}_INCLUDE_DIRS \"${${lib}_INCLUDE_DIRS}\")")
+ENDFOREACH()
+
 # Determine the include directories needed.
 SET(CTK_INCLUDE_DIRS_CONFIG
   ${CTK_BASE_INCLUDE_DIRS}
@@ -127,6 +136,8 @@ CONFIGURE_FILE(${CTK_SOURCE_DIR}/CTKConfig.cmake.in
                ${CTK_SUPERBUILD_BINARY_DIR}/CTKConfig.cmake @ONLY IMMEDIATE)
 CONFIGURE_FILE(${CTK_SOURCE_DIR}/CTKConfigVersion.cmake.in
                ${CTK_SUPERBUILD_BINARY_DIR}/CTKConfigVersion.cmake @ONLY IMMEDIATE)
+CONFIGURE_FILE(${CTK_SOURCE_DIR}/CTKConfig.h.in
+               ${CTK_SUPERBUILD_BINARY_DIR}/CTKConfig.h @ONLY IMMEDIATE)
 
 #-----------------------------------------------------------------------------
 # Settings specific to the install tree.