2010-11-26 18:04:54 +08:00
|
|
|
|
2011-11-29 06:43:57 +08:00
|
|
|
macro(simgear_component_common name includePath sourcesList sources headers)
|
2012-09-17 03:19:11 +08:00
|
|
|
set(fc${sourcesList} ${name})
|
|
|
|
set(fh${sourcesList} ${name})
|
2012-09-16 23:04:08 +08:00
|
|
|
foreach(s ${sources})
|
|
|
|
set_property(GLOBAL
|
|
|
|
APPEND PROPERTY ${sourcesList} "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
|
2012-09-17 03:19:11 +08:00
|
|
|
set(fc${sourcesList} "${fc${sourcesList}}#${CMAKE_CURRENT_SOURCE_DIR}/${s}")
|
2012-09-16 23:04:08 +08:00
|
|
|
endforeach()
|
2011-11-29 06:43:57 +08:00
|
|
|
|
2012-09-16 23:04:08 +08:00
|
|
|
foreach(h ${headers})
|
|
|
|
set_property(GLOBAL
|
|
|
|
APPEND PROPERTY PUBLIC_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
|
2012-09-17 03:19:11 +08:00
|
|
|
set(fh${sourcesList} "${fh${sourcesList}}#${CMAKE_CURRENT_SOURCE_DIR}/${h}")
|
2018-06-21 05:00:03 +08:00
|
|
|
|
|
|
|
# also append headers to the sources list, so that IDEs find the files
|
|
|
|
# correctly (otherwise they are not in the project)
|
|
|
|
set_property(GLOBAL
|
|
|
|
APPEND PROPERTY ${sourcesList} "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
|
2012-09-16 23:04:08 +08:00
|
|
|
endforeach()
|
2012-09-17 03:19:11 +08:00
|
|
|
|
|
|
|
set_property(GLOBAL APPEND PROPERTY FG_GROUPS_${sourcesList}_C "${fc${sourcesList}}@")
|
|
|
|
set_property(GLOBAL APPEND PROPERTY FG_GROUPS_${sourcesList}_H "${fh${sourcesList}}@")
|
2011-11-30 17:45:32 +08:00
|
|
|
|
|
|
|
install (FILES ${headers} DESTINATION include/simgear/${includePath})
|
2010-11-26 18:04:54 +08:00
|
|
|
endmacro()
|
2011-11-29 06:43:57 +08:00
|
|
|
|
|
|
|
function(simgear_component name includePath sources headers)
|
|
|
|
simgear_component_common(${name} ${includePath} CORE_SOURCES "${sources}" "${headers}")
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
function(simgear_scene_component name includePath sources headers)
|
|
|
|
simgear_component_common(${name} ${includePath} SCENE_SOURCES "${sources}" "${headers}")
|
|
|
|
endfunction()
|