Commit bcfb05d9 authored by Floris Berendsen's avatar Floris Berendsen
Browse files

STYLE: another cleanup SuperElastix/SuperElastix#33

parent 071855bf
......@@ -65,9 +65,10 @@ macro( _selxmodules_initialize )
# Collect header files for Visual Studio
# http://stackoverflow.com/questions/8316104/specify-how-cmake-creates-visual-studio-project
file( GLOB ${MODULE}_HEADER_FILES "${${MODULE}_SOURCE_DIR}/include/*.*" )
# Collect interface files for Visual Studio
file( GLOB ${MODULE}_INTERFACE_FILES "${${MODULE}_SOURCE_DIR}/interfaces/*.*" )
message( STATUS " Interfaces: ${${MODULE}_INTERFACE_FILES}")
# These variables are defined in the module's .cmake file
set( ${MODULE}_INCLUDE_DIRS )
set( ${MODULE}_SOURCE_FILES )
......@@ -83,6 +84,7 @@ macro( _selxmodules_initialize )
# Create dummy targets to show header-only Components and Interfaces in the Solution Explorer of Visual Studio
add_library(HeaderOnlyComponents "${CMAKE_SOURCE_DIR}/Modules/Components/HeaderOnlyComponents.cxx")
add_library(Interfaces "${CMAKE_SOURCE_DIR}/Modules/Components/Interfaces.cxx")
endmacro()
macro( _selxmodule_enable MODULE UPSTREAM )
......@@ -123,14 +125,15 @@ macro( _selxmodule_enable MODULE UPSTREAM )
add_library( ${MODULE} ${${MODULE}_HEADER_FILES} ${${MODULE}_SOURCE_FILES} )
else()
# Aggregate all header-only Components in a separate target.
# Aggregate all header-only Components in a separate target for Visual Studio IDE.
target_sources( HeaderOnlyComponents PUBLIC ${${MODULE}_HEADER_FILES} )
endif()
# Aggregate all interface headers in a separate target.
# Aggregate all interface headers in a separate target for Visual Studio IDE.
if( ${MODULE}_INTERFACE_FILES )
target_sources( Interfaces PUBLIC ${${MODULE}_INTERFACE_FILES} )
endif()
message( STATUS "${MODULE} enabled." )
else()
message( STATUS "${MODULE} already enabled." )
......
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