|
@@ -168,6 +168,7 @@ INCLUDE(CMake/ctkFunctionGeneratePluginManifest.cmake)
|
|
|
INCLUDE(CMake/ctkMacroGeneratePluginResourceFile.cmake)
|
|
|
INCLUDE(CMake/ctkFunctionCheckCompilerFlags.cmake)
|
|
|
INCLUDE(CMake/ctkFunctionGetIncludeDirs.cmake)
|
|
|
+INCLUDE(CMake/ctkFunctionGetLibraryDirs.cmake)
|
|
|
INCLUDE(CMake/ctkFunctionGetGccVersion.cmake)
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
@@ -549,7 +550,7 @@ IF(CTK_SUPERBUILD)
|
|
|
ENDIF()
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
-# Expand variables containing include directories for external projects
|
|
|
+# Expand variables containing include and library directories for external projects
|
|
|
# This relies on the variable EXTERNAL_TARGETS set in ctkMacroValidateBuildOptions
|
|
|
FOREACH(_external_target ${EXTERNAL_TARGETS})
|
|
|
IF(${_external_target}_FIND_PACKAGE_CMD)
|
|
@@ -576,6 +577,23 @@ FOREACH(_external_target ${EXTERNAL_TARGETS})
|
|
|
#MESSAGE("[${_external_target}] Appended dirs: ${${_external_target}_INCLUDE_DIRS}")
|
|
|
ENDIF()
|
|
|
ENDIF()
|
|
|
+ IF(${_external_target}_LIBRARY_DIRS)
|
|
|
+ STRING(REPLACE "^" ";" _library_variable_list "${${_external_target}_LIBRARY_DIRS}")
|
|
|
+ IF(_library_variable_list)
|
|
|
+ #MESSAGE("[${_external_target}] Resolving library variables: ${${_external_target}_LIBRARY_DIRS}")
|
|
|
+ SET(${_external_target}_LIBRARY_DIRS "")
|
|
|
+ FOREACH(_library_variable ${_library_variable_list})
|
|
|
+ #MESSAGE("[${_external_target}] Appending ${${_library_variable}}")
|
|
|
+ IF(${_library_variable})
|
|
|
+ LIST(APPEND ${_external_target}_LIBRARY_DIRS ${${_library_variable}})
|
|
|
+ ELSE()
|
|
|
+ LIST(APPEND ${_external_target}_LIBRARY_DIRS ${_library_variable})
|
|
|
+ ENDIF()
|
|
|
+ #MESSAGE("[${_external_target}] New dirs: ${${_external_target}_LIBRARY_DIRS}")
|
|
|
+ ENDFOREACH()
|
|
|
+ #MESSAGE("[${_external_target}] Appended dirs: ${${_external_target}_LIBRARY_DIRS}")
|
|
|
+ ENDIF()
|
|
|
+ ENDIF()
|
|
|
ENDFOREACH()
|
|
|
|
|
|
# Since PYTHONQT_USE_VTK library option can be enabled independently of
|