Selaa lähdekoodia

build the plugin

Sven Czarnian 3 vuotta sitten
vanhempi
commit
328420c185
1 muutettua tiedostoa jossa 50 lisäystä ja 0 poistoa
  1. 50 0
      src/CMakeLists.txt

+ 50 - 0
src/CMakeLists.txt

@@ -0,0 +1,50 @@
+# Author:
+#   Sven Czarnian <devel@svcz.de>
+# Copyright:
+#   2020-2021 Sven Czarnian
+# License:
+#   GNU General Public License (GPLv3)
+# Brief:
+#   Creates the plug-in which is used by Euroscope
+
+SET(SOURCE_FILES
+    ArrivalMANagerMain.cpp
+    PlugIn.cpp
+    PlugIn.h
+    stdafx.cpp
+    stdafx.h
+)
+SET(SOURCE_FILES_RES
+    ${CMAKE_BINARY_DIR}/ArrivalMANager.rc
+    ${CMAKE_SOURCE_DIR}/res/resource.h
+    ${CMAKE_SOURCE_DIR}/res/targetver.h
+)
+
+# define the plug in
+ADD_LIBRARY(
+    ArrivalMANager SHARED
+        ${SOURCE_FILES_RES}
+        ${SOURCE_FILES_UI}
+        ${SOURCE_FILES_UI_ELEMENTS}
+        ${SOURCE_FILES}
+)
+
+# define the dependencies
+TARGET_INCLUDE_DIRECTORIES(ArrivalMANager INTERFACE EuroScope)
+TARGET_LINK_LIBRARIES(ArrivalMANager EuroScope)
+
+# configure the debugger and update the linker flags
+IF(MSVC)
+    SET_TARGET_PROPERTIES(ArrivalMANager
+        PROPERTIES
+            VS_DEBUGGER_COMMAND ${EuroScope_EXECUTABLE}
+            VS_DEBUGGER_WORKING_DIRECTORY ${EuroScope_DIR}
+    )
+    SET_TARGET_PROPERTIES(ArrivalMANager
+        PROPERTIES
+            LINK_FLAGS /SUBSYSTEM:WINDOWS
+    )
+ENDIF()
+
+SOURCE_GROUP("Source Files" FILES ${SOURCE_FILES})
+SOURCE_GROUP("Source Files\\res" FILES ${SOURCE_FILES_RES})