80 lines
1.9 KiB
CMake
80 lines
1.9 KiB
CMake
file(GLOB socket CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/websocket/*.cpp)
|
|
file(GLOB recorder CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/recorder/*.cpp)
|
|
|
|
enable_language(RC)
|
|
|
|
# Add WIN32 to hide console window
|
|
add_executable(germanairlinesva_esp WIN32
|
|
${socket}
|
|
${recorder}
|
|
resources/resources-${BIT}.rc
|
|
simconnect.cpp
|
|
main.cpp
|
|
)
|
|
|
|
target_include_directories(germanairlinesva_esp PRIVATE
|
|
${CMAKE_SOURCE_DIR}/esp/include
|
|
${CMAKE_SOURCE_DIR}/file/include
|
|
${CMAKE_SOURCE_DIR}/recorder/include
|
|
${CMAKE_SOURCE_DIR}/simdata/include
|
|
${CMAKE_SOURCE_DIR}/websocket/include
|
|
${CMAKE_SOURCE_DIR}/utilities/include
|
|
${CMAKE_SOURCE_DIR}/ixwebsocket/include
|
|
${CMAKE_SOURCE_DIR}/nlohmann/include
|
|
${CMAKE_SOURCE_DIR}/SimConnect/${BIT}/include
|
|
)
|
|
|
|
target_compile_definitions(germanairlinesva_esp PRIVATE
|
|
BIT="${BIT}"
|
|
IBM
|
|
)
|
|
if (MSFS)
|
|
target_compile_definitions(germanairlinesva_esp PRIVATE
|
|
MSFS
|
|
)
|
|
endif()
|
|
|
|
target_compile_options(germanairlinesva_esp PRIVATE
|
|
-Wall
|
|
-Wextra
|
|
-pedantic
|
|
-fvisibility=hidden
|
|
)
|
|
if(DEBUG)
|
|
target_compile_options(germanairlinesva_esp PRIVATE
|
|
-g
|
|
)
|
|
target_link_options(germanairlinesva_esp PRIVATE
|
|
-g
|
|
)
|
|
else()
|
|
target_compile_options(germanairlinesva_esp PRIVATE
|
|
-O2
|
|
)
|
|
endif()
|
|
|
|
message("Building for Windows ${BIT} into ${PROJECT_BINARY_DIR}/ESP/${BIT}/${PLUGIN_NAME}")
|
|
|
|
set_target_properties(germanairlinesva_esp PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/ESP/${BIT}/${PLUGIN_NAME}"
|
|
OUTPUT_NAME "GA Connector"
|
|
)
|
|
|
|
if(DEBUG)
|
|
target_compile_options(germanairlinesva_esp PRIVATE
|
|
-gcodeview
|
|
)
|
|
target_link_options(germanairlinesva_esp PRIVATE
|
|
-Wl,-pdb=
|
|
)
|
|
endif()
|
|
|
|
target_link_libraries(germanairlinesva_esp PRIVATE
|
|
user32
|
|
shell32
|
|
version
|
|
ixwebsocket
|
|
pthread
|
|
${CMAKE_SOURCE_DIR}/SimConnect/${BIT}/SimConnect.lib
|
|
)
|