mirror of
https://gitlab.com/spaceti-app/integrations/acs/colnod-connector.git
synced 2026-07-12 18:10:37 +02:00
Add cmake
This commit is contained in:
parent
9784c31174
commit
9d7f967843
10
CMakeLists.txt
Normal file
10
CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.11.0)
|
||||||
|
project(colnodconn)
|
||||||
|
message(">> Project colnod-connector")
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
add_subdirectory(server-sdk)
|
||||||
|
add_subdirectory(src)
|
||||||
36
src/CMakeLists.txt
Normal file
36
src/CMakeLists.txt
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.1.0)
|
||||||
|
project(colnod-connector VERSION 0.1.0)
|
||||||
|
|
||||||
|
message(">> APP ${PROJECT_NAME} ${PROJECT_VERSION}")
|
||||||
|
|
||||||
|
cmake_policy(SET CMP0063 NEW)
|
||||||
|
cmake_policy(SET CMP0075 NEW)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
|
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||||
|
find_package(Qt5 COMPONENTS Sql REQUIRED)
|
||||||
|
find_package(Qt5 COMPONENTS Network REQUIRED)
|
||||||
|
|
||||||
|
# find all cpp files from app and colnod folders
|
||||||
|
# app contains main()
|
||||||
|
file(GLOB_RECURSE APP_SOURCE_FILES FILES_MATCHING PATTERN "app/*.cpp")
|
||||||
|
# colnod contains additional files, but is part of the application executable
|
||||||
|
# so we do not make colnod folder into separate library but include it in the final executable directly
|
||||||
|
file(GLOB_RECURSE COLNOD_SOURCE_FILES FILES_MATCHING PATTERN "colnod/*.cpp")
|
||||||
|
|
||||||
|
# creates actual cmake target seen in cmake
|
||||||
|
add_executable(${PROJECT_NAME} ${APP_SOURCE_FILES} ${COLNOD_SOURCE_FILES})
|
||||||
|
|
||||||
|
# link QT and server-sdk submodule
|
||||||
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
Qt5::Core
|
||||||
|
Qt5::Sql
|
||||||
|
Qt5::Network
|
||||||
|
serversdk # link server-sdk git submodule
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
|
||||||
|
target_compile_options(${PROJECT_NAME} PUBLIC -O0 -Wall)
|
||||||
Loading…
x
Reference in New Issue
Block a user