1
0
Fork 0
flightgear/utils/fgcom/CMakeLists.txt
2016-10-30 22:15:54 +00:00

35 lines
837 B
CMake

set(name fgcom)
find_package(OpenAL REQUIRED)
# 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 "\"
};")
if(MSVC)
set(RESOURCE_FILE fgcom.rc)
endif(MSVC)
set(SOURCES fgcom.cxx)
set(HEADERS fgcom.hxx positions.hxx)
add_executable(${name}
${SOURCES}
${HEADERS}
${RESOURCE_FILE}
)
target_link_Libraries(${name}
iaxclient_lib
${OPENAL_LIBRARY}
SimGearCore
)
install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})