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

COMP: PluginDependencies: Re-adding a CMake variable containing a list
of dependencies, after the commit was lost during merging.

Sascha Zelzer 14 éve
szülő
commit
a0ec5ecaff

+ 5 - 0
Applications/ctkPluginGenerator/CMakeLists.txt

@@ -32,6 +32,11 @@ ctkMacroGetTargetLibraries(KIT_target_libraries)
 SET(KIT_include_directories
 SET(KIT_include_directories
 )
 )
 
 
+# Fix this after having discussed include dependencies with Jc
+FOREACH(_dep ${${PROJECT_NAME}_DEPENDENCIES})
+  INCLUDE_DIRECTORIES(${${_dep}_SOURCE_DIR} ${${_dep}_BINARY_DIR})
+ENDFOREACH()
+
 ctkMacroBuildApp(
 ctkMacroBuildApp(
   NAME ${PROJECT_NAME}
   NAME ${PROJECT_NAME}
   INCLUDE_DIRECTORIES ${KIT_include_directories}
   INCLUDE_DIRECTORIES ${KIT_include_directories}

+ 1 - 5
Applications/ctkPluginGenerator/target_libraries.cmake

@@ -4,11 +4,7 @@
 # This file should list the libraries required to build the current CTK application.
 # This file should list the libraries required to build the current CTK application.
 # 
 # 
 
 
-SET(plugin_dependencies
-  org_commontk_plugingenerator
-)
-
 SET(target_libraries
 SET(target_libraries
   CTKPluginFramework
   CTKPluginFramework
-  plugin_dependencies
+  org_commontk_plugingenerator_ui
   )
   )

+ 7 - 0
CMake/ctkMacroValidateBuildOptions.cmake

@@ -126,9 +126,16 @@ MACRO(ctkMacroValidateBuildOptions dir executable target_directories)
         MESSAGE(FATAL_ERROR "Failed to obtain dependence path of ${target_project_name}.\n${RESULT_VAR}\n${CTK_BINARY_DIR}\n${error}")
         MESSAGE(FATAL_ERROR "Failed to obtain dependence path of ${target_project_name}.\n${RESULT_VAR}\n${CTK_BINARY_DIR}\n${error}")
       ENDIF()
       ENDIF()
 
 
+      # Set a variable for each target containing its dependencies
+      # Needed for setting individual include directories for plugins,
+      # depending on other plugins.
+      SET(${target_project_name}_DEPENDENCIES )
+
       # Convert 'dep_path' to a list
       # Convert 'dep_path' to a list
       STRING(REPLACE " " "\\;" dep_path_list ${dep_path})
       STRING(REPLACE " " "\\;" dep_path_list ${dep_path})
       SET(dep_path_list ${dep_path_list})
       SET(dep_path_list ${dep_path_list})
+      LIST(REMOVE_ITEM dep_path_list ${target_project_name})
+      LIST(APPEND ${target_project_name}_DEPENDENCIES ${dep_path_list})
 
 
       #MESSAGE("path for ${target_project_name} is: ${dep_path_list}")
       #MESSAGE("path for ${target_project_name} is: ${dep_path_list}")