From 4d9bf8032dd659e091394d688b6a2c59bf222240 Mon Sep 17 00:00:00 2001 From: Vitaly Svyastyn Date: Tue, 31 Oct 2017 13:32:16 +0200 Subject: Initial CMake support. (#1013) * CMake files for building application and core library. * CMake files for core plugins. Now it runs! * CMake files for some plugins. --- cmake/core.cmake | 8 ++++++++ cmake/icons.cmake | 7 +++++++ cmake/lib.cmake | 7 +++++++ cmake/plugin.cmake | 6 ++++++ 4 files changed, 28 insertions(+) create mode 100644 cmake/core.cmake create mode 100644 cmake/icons.cmake create mode 100644 cmake/lib.cmake create mode 100644 cmake/plugin.cmake (limited to 'cmake') diff --git a/cmake/core.cmake b/cmake/core.cmake new file mode 100644 index 0000000000..7c8677d4e1 --- /dev/null +++ b/cmake/core.cmake @@ -0,0 +1,8 @@ +include_directories(.) +file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc") +add_library(${TARGET} SHARED ${SOURCES}) +set_target_properties(${TARGET} PROPERTIES + LINK_FLAGS "/SUBSYSTEM:WINDOWS" + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$/Core" +) +target_link_libraries(${TARGET} ${COMMON_LIBS}) \ No newline at end of file diff --git a/cmake/icons.cmake b/cmake/icons.cmake new file mode 100644 index 0000000000..c03630ef49 --- /dev/null +++ b/cmake/icons.cmake @@ -0,0 +1,7 @@ +file(GLOB SOURCES "src/*.h" "res/*.rc") +add_library(${TARGET} SHARED ${SOURCES}) +set_target_properties(${TARGET} PROPERTIES + LINK_FLAGS "/SUBSYSTEM:WINDOWS /NOENTRY" + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$/Icons" +) +target_link_libraries(${TARGET} ${COMMON_LIBS}) \ No newline at end of file diff --git a/cmake/lib.cmake b/cmake/lib.cmake new file mode 100644 index 0000000000..7c94c732e3 --- /dev/null +++ b/cmake/lib.cmake @@ -0,0 +1,7 @@ +add_library(${TARGET} SHARED ${SOURCES}) +set_target_properties(${TARGET} PROPERTIES + LINK_FLAGS "/SUBSYSTEM:WINDOWS" + SUFFIX ".mir" + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$/Libs" +) +target_link_libraries(${TARGET} ${COMMON_LIBS}) \ No newline at end of file diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake new file mode 100644 index 0000000000..9d3efac2e0 --- /dev/null +++ b/cmake/plugin.cmake @@ -0,0 +1,6 @@ +add_library(${TARGET} SHARED ${SOURCES}) +set_target_properties(${TARGET} PROPERTIES + LINK_FLAGS "/SUBSYSTEM:WINDOWS" + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/$/Plugins" +) +target_link_libraries(${TARGET} ${COMMON_LIBS}) \ No newline at end of file -- cgit v1.2.3