2020-04-23 20:59:09 +02:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2019-04-05 23:09:00 +02:00
|
|
|
|
2019-08-26 02:00:47 +02:00
|
|
|
include(CheckIncludeFiles)
|
|
|
|
include(CheckFunctionExists)
|
|
|
|
|
|
|
|
if(CMAKE_VERSION VERSION_GREATER 3.0)
|
|
|
|
check_function_exists(geteuid HAVE_GETEUID)
|
|
|
|
check_function_exists(getpwuid HAVE_GETPWUID)
|
|
|
|
endif()
|
|
|
|
|
2019-01-07 01:00:58 +01:00
|
|
|
set(SINGLEAPP-SOURCES singleapplication.cpp singleapplication_p.cpp)
|
|
|
|
set(SINGLEAPP-MOC-HEADERS singleapplication.h singleapplication_p.h)
|
|
|
|
QT5_WRAP_CPP(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS})
|
2020-04-23 20:59:09 +02:00
|
|
|
add_library(singleapplication STATIC ${SINGLEAPP-SOURCES} ${SINGLEAPP-SOURCES-MOC})
|
2020-06-17 22:56:20 +02:00
|
|
|
target_include_directories(singleapplication PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${Qt5Core_INCLUDE_DIRS}
|
|
|
|
${Qt5Widgets_INCLUDE_DIRS}
|
|
|
|
${Qt5Network_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
target_link_libraries(singleapplication PRIVATE
|
|
|
|
${Qt5Core_LIBRARIES}
|
|
|
|
${Qt5Widgets_LIBRARIES}
|
|
|
|
${Qt5Network_LIBRARIES}
|
|
|
|
)
|
2019-01-11 01:04:13 +01:00
|
|
|
|
|
|
|
set(SINGLECOREAPP-SOURCES singlecoreapplication.cpp singlecoreapplication_p.cpp)
|
|
|
|
set(SINGLECOREAPP-MOC-HEADERS singlecoreapplication.h singlecoreapplication_p.h)
|
|
|
|
QT5_WRAP_CPP(SINGLECOREAPP-SOURCES-MOC ${SINGLECOREAPP-MOC-HEADERS})
|
2020-04-23 20:59:09 +02:00
|
|
|
add_library(singlecoreapplication STATIC ${SINGLECOREAPP-SOURCES} ${SINGLECOREAPP-SOURCES-MOC})
|
2020-06-17 22:56:20 +02:00
|
|
|
target_include_directories(singlecoreapplication PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${Qt5Core_INCLUDE_DIRS}
|
|
|
|
${Qt5Network_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
target_link_libraries(singlecoreapplication PRIVATE
|
|
|
|
${Qt5Core_LIBRARIES}
|
|
|
|
${Qt5Network_LIBRARIES}
|
|
|
|
)
|
2019-08-26 02:00:47 +02:00
|
|
|
|
|
|
|
configure_file(config.h.in "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|