cmake update

This commit is contained in:
Sale Djenic 2022-03-14 14:43:56 +01:00 committed by Stefan Dunca
parent e3b0610b65
commit 9c45dcad8b
11 changed files with 51 additions and 6 deletions

View File

@ -0,0 +1,28 @@
{
"configurations": [
{
"name": "Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
},
{
"name": "Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\build\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": []
}
]
}

View File

@ -1,7 +1,7 @@
add_executable(${PROJECT_NAME})
target_link_libraries(
${PROJECT_NAME}
${PROJECT_NAME} PRIVATE
Qt5::Core
Qt5::Gui
Qt5::Widgets
@ -11,6 +11,9 @@ target_link_libraries(
Qt5::QuickControls2
Qt5::QuickTemplates2
Qt5::Multimedia
Qt5::Concurrent
Status.Services
${STATUS_GO_LIB}
)
file(GLOB_RECURSE SOURCES

View File

@ -4,7 +4,7 @@ find_library(FOUNDATION_FRAMEWORK Foundation)
find_library(IO_KIT_FRAMEWORK IOKit)
target_link_libraries(
${PROJECT_NAME}
${PROJECT_NAME} PRIVATE
Qt5::Core
Qt5::Gui
Qt5::Widgets
@ -18,6 +18,7 @@ target_link_libraries(
${FOUNDATION_FRAMEWORK}
${IO_KIT_FRAMEWORK}
Status.Services
${STATUS_GO_LIB}
)
file(GLOB_RECURSE SOURCES

View File

@ -1,7 +1,7 @@
add_executable(${PROJECT_NAME} WIN32)
target_link_libraries(
${PROJECT_NAME}
${PROJECT_NAME} PRIVATE
Qt5::Core
Qt5::Gui
Qt5::Widgets
@ -11,6 +11,9 @@ target_link_libraries(
Qt5::QuickControls2
Qt5::QuickTemplates2
Qt5::Multimedia
Qt5::Concurrent
Status.Services
${STATUS_GO_LIB}
)
file(GLOB_RECURSE SOURCES

View File

@ -12,5 +12,8 @@ if ($ENV{QTDIR} LESS_EQUAL "")
message(FATAL_ERROR "Please set the path to your Qt dir as `QTDIR` variable in your ENV. Example: QTDIR=/Qt/Qt5.14.2/5.14.2/clang_64")
endif()
message("Located QtDir: " $ENV{QTDIR})
set(CMAKE_PREFIX_PATH $ENV{QTDIR})
add_definitions(-DSTATUS_SOURCE_DIR="${CMAKE_SOURCE_DIR}")
add_definitions(-DSTATUS_DEVELOPMENT=true)

View File

@ -1,5 +1,5 @@
target_link_libraries(
${PROJECT_NAME}
${PROJECT_NAME} PRIVATE
Qt5::Core
Status.Backend
)

View File

@ -5,7 +5,7 @@ find_library(CORE_SERVICES_FRAMEWORK CoreServices)
find_library(LOCAL_AUTHENTICATION_FRAMEWORK LocalAuthentication)
target_link_libraries(
${PROJECT_NAME}
${PROJECT_NAME} PRIVATE
Qt5::Core
${FOUNDATION_FRAMEWORK}
${IO_KIT_FRAMEWORK}

View File

@ -1,5 +1,5 @@
target_link_libraries(
${PROJECT_NAME}
${PROJECT_NAME} PRIVATE
Qt5::Core
Status.Backend
)

View File

@ -34,4 +34,7 @@ endif ()
check_translations()
add_dependencies(${PROJECT_NAME} ${STATUS_GO_LIB})
add_dependencies(${PROJECT_NAME} Status.Services)
target_sources(${PROJECT_NAME} PRIVATE ${SOURCES})

View File

@ -8,6 +8,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_library(${PROJECT_NAME} SHARED)
add_dependencies(${PROJECT_NAME} ${STATUS_GO_LIB})
file(
GLOB_RECURSE SOURCES
"*.h"

View File

@ -17,6 +17,8 @@ elseif(UNIX)
include("${CMAKE_SOURCE_DIR}/cmake/services-linux.cmake")
endif ()
add_dependencies(${PROJECT_NAME} Status.Backend)
target_sources(${PROJECT_NAME} PRIVATE ${SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC include)