2014-08-19 20:46:42 +02:00
|
|
|
set(name fgcom)
|
2013-09-27 16:05:45 +02:00
|
|
|
|
2016-01-30 01:59:16 +00:00
|
|
|
find_package(OpenAL REQUIRED)
|
|
|
|
|
2014-08-19 20:46:42 +02:00
|
|
|
# Copy positions.txt content in const char* _positionsData[];
|
|
|
|
file(READ utils/positions.txt POSITIONS_DATA)
|
|
|
|
string(REGEX REPLACE "\n" "\"%
|
|
|
|
\"" POSITIONS_DATA ${POSITIONS_DATA})
|
|
|
|
string(REGEX REPLACE "%" "," POSITIONS_DATA ${POSITIONS_DATA})
|
|
|
|
file(WRITE positions.hxx "const char* _positionsData[] = {
|
|
|
|
\"")
|
|
|
|
file(APPEND positions.hxx ${POSITIONS_DATA})
|
|
|
|
file(APPEND positions.hxx "\"
|
|
|
|
};")
|
2013-10-31 14:07:31 +01:00
|
|
|
|
2014-08-19 20:46:42 +02:00
|
|
|
if(MSVC)
|
|
|
|
set(RESOURCE_FILE fgcom.rc)
|
|
|
|
endif(MSVC)
|
2013-11-27 13:48:14 +01:00
|
|
|
|
2014-08-19 20:46:42 +02:00
|
|
|
set(SOURCES fgcom.cxx)
|
|
|
|
set(HEADERS fgcom.hxx positions.hxx)
|
2013-09-27 16:05:45 +02:00
|
|
|
|
2014-08-19 20:46:42 +02:00
|
|
|
add_executable(${name}
|
|
|
|
${SOURCES}
|
|
|
|
${HEADERS}
|
|
|
|
${RESOURCE_FILE}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_Libraries(${name}
|
|
|
|
iaxclient_lib
|
|
|
|
${OPENAL_LIBRARY}
|
2016-01-30 01:59:16 +00:00
|
|
|
SimGearCore
|
2014-08-19 20:46:42 +02:00
|
|
|
)
|
|
|
|
|
2016-07-09 17:14:28 -04:00
|
|
|
install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|