2010-11-30 10:08:30 +00:00
|
|
|
|
|
|
|
macro(flightgear_component name sources)
|
2012-09-16 17:26:12 +00:00
|
|
|
set(fc ${name})
|
|
|
|
set(fh ${name})
|
2012-03-26 12:09:39 +00:00
|
|
|
foreach(s ${sources})
|
|
|
|
set_property(GLOBAL
|
|
|
|
APPEND PROPERTY FG_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
|
2012-09-16 17:26:12 +00:00
|
|
|
set(fc "${fc}#${CMAKE_CURRENT_SOURCE_DIR}/${s}")
|
2021-03-08 15:53:53 +00:00
|
|
|
|
|
|
|
# becuase we can't require CMake 3.13, we can't use CMP0076
|
|
|
|
# so we need to manually resolve relative paths into absolute paths
|
|
|
|
target_sources(fgfsObjects PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/${s})
|
|
|
|
|
2012-03-26 12:09:39 +00:00
|
|
|
endforeach()
|
2010-11-30 10:08:30 +00:00
|
|
|
|
2012-09-16 17:26:12 +00:00
|
|
|
foreach(h ${ARGV2})
|
|
|
|
set_property(GLOBAL
|
|
|
|
APPEND PROPERTY FG_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
|
|
|
|
set(fh "${fh}#${CMAKE_CURRENT_SOURCE_DIR}/${h}")
|
2021-03-08 15:53:53 +00:00
|
|
|
|
|
|
|
# becuase we can't require CMake 3.13, we can't use CMP0076
|
|
|
|
# so we need to manually resolve relative paths into absolute paths
|
|
|
|
target_sources(fgfsObjects PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/${h})
|
2012-09-16 17:26:12 +00:00
|
|
|
endforeach()
|
|
|
|
|
2021-03-08 16:44:42 +00:00
|
|
|
# third argument is TEST_SOURCES
|
|
|
|
foreach(t ${ARGV3})
|
|
|
|
set_property(GLOBAL
|
|
|
|
APPEND PROPERTY FG_TEST_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${t}")
|
|
|
|
set(fc "${fh}#${CMAKE_CURRENT_SOURCE_DIR}/${t}")
|
|
|
|
endforeach()
|
|
|
|
|
2012-09-16 17:26:12 +00:00
|
|
|
set_property(GLOBAL APPEND PROPERTY FG_GROUPS_C "${fc}@")
|
|
|
|
set_property(GLOBAL APPEND PROPERTY FG_GROUPS_H "${fh}@")
|
2021-03-08 15:53:53 +00:00
|
|
|
|
2010-11-30 10:08:30 +00:00
|
|
|
endmacro()
|