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)
|
|
|
|
|
2021-11-04 00:05:06 +01:00
|
|
|
check_function_exists(geteuid HAVE_GETEUID)
|
|
|
|
check_function_exists(getpwuid HAVE_GETPWUID)
|
2019-08-26 02:00:47 +02:00
|
|
|
|
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)
|
2021-07-30 21:17:50 +02:00
|
|
|
qt_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-26 23:26:04 +02:00
|
|
|
target_include_directories(singleapplication PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
)
|
2020-06-17 22:56:20 +02:00
|
|
|
target_link_libraries(singleapplication PRIVATE
|
2020-07-18 04:47:54 +02:00
|
|
|
${QtCore_LIBRARIES}
|
|
|
|
${QtWidgets_LIBRARIES}
|
|
|
|
${QtNetwork_LIBRARIES}
|
2020-06-17 22:56:20 +02:00
|
|
|
)
|
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)
|
2021-07-30 21:17:50 +02:00
|
|
|
qt_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}
|
|
|
|
)
|
|
|
|
target_link_libraries(singlecoreapplication PRIVATE
|
2020-07-18 04:47:54 +02:00
|
|
|
${QtCore_LIBRARIES}
|
|
|
|
${QtNetwork_LIBRARIES}
|
2020-06-17 22:56:20 +02:00
|
|
|
)
|
2019-08-26 02:00:47 +02:00
|
|
|
|
|
|
|
configure_file(config.h.in "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|