Commit a18547c0 authored by jcfr's avatar jcfr
Browse files

COMP: Logic of modules can now link and include header associated with other module logic

The following variables have been introduced
 Slicer_ModuleLogic_INCLUDE_DIRS
 Slicer_ModuleLogic_LIBRARY_DIRS
 Slicer_ModuleLogic_LIBRARIES

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16411 3bd1e089-480b-0410-8dfb-8563597acbee
parent 60c03550
......@@ -43,7 +43,7 @@ MACRO(SlicerMacroBuildModuleLogic)
# Define library name
# --------------------------------------------------------------------------
SET(lib_name ${MODULELOGIC_NAME})
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
......@@ -52,9 +52,16 @@ MACRO(SlicerMacroBuildModuleLogic)
${CMAKE_CURRENT_BINARY_DIR}
${Slicer_Libs_INCLUDE_DIRS}
${Slicer_Base_INCLUDE_DIRS}
${Slicer_ModuleLogic_INCLUDE_DIRS}
${MODULELOGIC_INCLUDE_DIRECTORIES}
)
#-----------------------------------------------------------------------------
# Update Slicer_ModuleLogic_INCLUDE_DIRS
#-----------------------------------------------------------------------------
SET(Slicer_ModuleLogic_INCLUDE_DIRS ${Slicer_ModuleLogic_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "Slicer Module logic includes" FORCE)
#-----------------------------------------------------------------------------
# Configure export header
#-----------------------------------------------------------------------------
......@@ -114,6 +121,7 @@ MACRO(SlicerMacroBuildModuleLogic)
TARGET_LINK_LIBRARIES(${lib_name}
${Slicer_Libs_LIBRARIES}
${Slicer_ModuleLogic_Base_LIBRARIES}
${Slicer_ModuleLogic_LIBRARIES}
${MODULELOGIC_TARGET_LIBRARIES}
)
......@@ -122,6 +130,11 @@ MACRO(SlicerMacroBuildModuleLogic)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES ${Slicer_LIBRARY_PROPERTIES})
ENDIF()
# --------------------------------------------------------------------------
# Update Slicer_ModuleLogic_LIBRARIES
# --------------------------------------------------------------------------
SET(Slicer_ModuleLogic_LIBRARIES ${Slicer_ModuleLogic_LIBRARIES} ${lib_name} CACHE INTERNAL "Slicer Module logic libraries" FORCE)
# --------------------------------------------------------------------------
# Install library
# --------------------------------------------------------------------------
......
......@@ -272,9 +272,11 @@ ENDIF()
SET(Slicer_Libs_LIBRARIES CACHE INTERNAL "Slicer Libs libraries" FORCE)
SET(Slicer_Base_LIBRARIES CACHE INTERNAL "Slicer Base libraries" FORCE)
SET(Slicer_ModuleLogic_LIBRARIES CACHE INTERNAL "Slicer Module logic libraries" FORCE)
SET(Slicer_Libs_INCLUDE_DIRS CACHE INTERNAL "Slicer Libs includes" FORCE)
SET(Slicer_Base_INCLUDE_DIRS CACHE INTERNAL "Slicer Base includes" FORCE)
SET(Slicer_ModuleLogic_INCLUDE_DIRS CACHE INTERNAL "Slicer Module logic includes" FORCE)
#-----------------------------------------------------------------------------
# Get sytem name and architecture
......
......@@ -38,6 +38,10 @@ SET(Slicer_Libs_LIBRARY_DIRS_CONFIG ${Slicer_BINARY_DIR}/bin ${Slicer_BINARY_DIR
SET(Slicer_Base_INCLUDE_DIRS_CONFIG ${Slicer_Base_INCLUDE_DIRS})
SET(Slicer_Base_LIBRARY_DIRS_CONFIG ${Slicer_BINARY_DIR}/bin)
SET(Slicer_ModuleLogic_INCLUDE_DIRS_CONFIG ${Slicer_ModuleLogic_INCLUDE_DIRS})
SET(Slicer_ModuleLogic_LIBRARY_DIRS_CONFIG ${CMAKE_BINARY_DIR}/${Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR})
# Qt
SET(QT_QMAKE_EXECUTABLE_CONFIG ${QT_QMAKE_EXECUTABLE})
......
......@@ -74,6 +74,16 @@ set(Slicer_Base_LIBRARY_DIRS "@Slicer_Base_LIBRARY_DIRS_CONFIG@")
# Slicer Base include file directories.
set(Slicer_Base_INCLUDE_DIRS "@Slicer_BINARY_DIR@" "@Slicer_Base_INCLUDE_DIRS_CONFIG@")
# Slicer Module logic libraries. Those listed here should
# automatically pull in their dependencies.
set(Slicer_ModuleLogic_LIBRARIES "@Slicer_ModuleLogic_LIBRARIES@")
# Slicer Module logic library directories.
set(Slicer_ModuleLogic_LIBRARY_DIRS "@Slicer_ModuleLogic_LIBRARY_DIRS_CONFIG@")
# Slicer Module logic include file directories.
set(Slicer_ModuleLogic_INCLUDE_DIRS "@Slicer_ModuleLogic_INCLUDE_DIRS_CONFIG@")
# The location of the UseSlicer.cmake file.
set(Slicer_USE_FILE "@Slicer_USE_FILE_CONFIG@")
......
......@@ -69,6 +69,7 @@ endif()
link_directories(
${Slicer_Libs_LIBRARY_DIRS}
${Slicer_Base_LIBRARY_DIRS}
${Slicer_ModuleLogic_LIBRARY_DIRS}
)
#-----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment