summaryrefslogtreecommitdiffhomepage
path: root/x-plane-plugin/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'x-plane-plugin/CMakeLists.txt')
-rw-r--r--x-plane-plugin/CMakeLists.txt27
1 files changed, 13 insertions, 14 deletions
diff --git a/x-plane-plugin/CMakeLists.txt b/x-plane-plugin/CMakeLists.txt
index f7bb7a3f..1d686d98 100644
--- a/x-plane-plugin/CMakeLists.txt
+++ b/x-plane-plugin/CMakeLists.txt
@@ -8,29 +8,28 @@ if(LINUX OR APPLE)
target_include_directories(opentrack-xplane-plugin SYSTEM PUBLIC ${SDK_XPLANE}/CHeaders ${SDK_XPLANE}/CHeaders/XPLM)
if(APPLE)
- set_property(TARGET opentrack-xplane-plugin APPEND_STRING PROPERTY
- COMPILE_FLAGS "-iframework ${SDK_XPLANE}/Libraries/Mac/ -DAPL -DXPLM200 -DXPLM210 -framework XPLM -framework XPWidgets ")
- set_property(TARGET opentrack-xplane-plugin APPEND_STRING PROPERTY
- LINK_FLAGS "-F${SDK_XPLANE}/Libraries/Mac/ -framework XPLM -framework XPWidgets ")
+ target_compile_options(${self} PRIVATE
+ -iframework "${SDK_XPLANE}/Libraries/Mac/"
+ -DAPL -DXPLM200 -DXPLM210
+ -framework XPLM -framework XPWidgets)
+ target_link_options(${self}
+ "-F${SDK_XPLANE}/Libraries/Mac/"
+ -framework XPLM -framework XPWidgets)
elseif(CMAKE_COMPILER_IS_GNUCXX)
- set_property(TARGET opentrack-xplane-plugin APPEND_STRING PROPERTY
- COMPILE_FLAGS "-DLIN -DXPLM200 -DXPLM210 ")
- set_property(TARGET opentrack-xplane-plugin APPEND_STRING PROPERTY
- LINK_FLAGS "-rdynamic -nodefaultlibs ")
+ target_compile_options(${self} PRIVATE -DLIN -DXPLM200 -DXPLM210)
+ target_link_options(${self} PRIVATE -rdynamic -nodefaultlibs)
endif()
if(CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_COMPILER_IS_CLANG)
- set_property(TARGET opentrack-xplane-plugin APPEND_STRING PROPERTY
- LINK_FLAGS "-undefined_warning ")
+ target_link_options(${self} PRIVATE -undefined_warning)
endif()
- set_target_properties(opentrack-xplane-plugin PROPERTIES
+ set_target_properties(${self} PROPERTIES
LIBRARY_OUTPUT_NAME "opentrack.xpl"
- PREFIX ""
- SUFFIX "")
+ PREFIX "" SUFFIX "")
if(UNIX AND NOT APPLE)
- target_link_libraries(opentrack-xplane-plugin rt)
+ target_link_libraries(${self} rt)
endif()
endif()
endif()