Commit 1532ac6d authored by Floris Berendsen's avatar Floris Berendsen
Browse files

COMP: Created two dummy targets to aggregate all header files of

header-only Components and of Interface
parent 16a26651
......@@ -64,8 +64,13 @@ 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/*.*" )
file( GLOB ${MODULE}_HEADER_FILES "${${MODULE}_SOURCE_DIR}/include/*.*" )
message(STATUS " scanning: ${${MODULE}_SOURCE_DIR}/include/*.*")
message(STATUS " found: ${${MODULE}_HEADER_FILES}")
# Collect header files for Visual Studio
# http://stackoverflow.com/questions/8316104/specify-how-cmake-creates-visual-studio-project
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 )
......@@ -77,6 +82,10 @@ macro( _selxmodules_initialize )
list( APPEND SUPERELASTIX_MODULES ${MODULE} )
endforeach()
# 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 )
......@@ -116,8 +125,15 @@ macro( _selxmodule_enable MODULE UPSTREAM )
endif()
add_library( ${MODULE} ${${MODULE}_HEADER_FILES} ${${MODULE}_SOURCE_FILES} )
else()
# Aggregate all header-only Components in a separate target.
target_sources( HeaderOnlyComponents PUBLIC ${${MODULE}_HEADER_FILES} )
endif()
# Aggregate all interface headers in a separate target.
if( ${MODULE}_INTERFACE_FILES )
target_sources( Interfaces PUBLIC ${${MODULE}_INTERFACE_FILES} )
endif()
message( STATUS "${MODULE} enabled." )
else()
message( STATUS "${MODULE} already enabled." )
......
/*=========================================================================
*
* Copyright Leiden University Medical Center, Erasmus University Medical
* Center and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
// This is an empty file to let cmake aggregate all header-only components,
// required to show these headers in Visual 2013 Studio Solution Explorer
\ No newline at end of file
/*=========================================================================
*
* Copyright Leiden University Medical Center, Erasmus University Medical
* Center and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
// This is an empty file to let cmake aggregate all interface files,
// required to show these headers in Visual 2013 Studio Solution Explorer
\ No newline at end of file
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