1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-14 18:03:44 +01:00
strawberry-audio-player-win.../3rdparty/singleapplication/CMakeLists.txt

47 lines
1.5 KiB
CMake
Raw Normal View History

2020-04-23 20:59:09 +02:00
cmake_minimum_required(VERSION 3.0)
2019-04-05 23:09:00 +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()
set(SINGLEAPP-SOURCES singleapplication.cpp singleapplication_p.cpp)
set(SINGLEAPP-MOC-HEADERS singleapplication.h singleapplication_p.h)
2020-10-01 19:43:39 +02:00
if(BUILD_WITH_QT6)
2020-07-18 04:47:54 +02:00
qt6_wrap_cpp(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS})
else()
qt5_wrap_cpp(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS})
endif()
2020-04-23 20:59:09 +02:00
add_library(singleapplication STATIC ${SINGLEAPP-SOURCES} ${SINGLEAPP-SOURCES-MOC})
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)
2020-10-01 19:43:39 +02:00
if(BUILD_WITH_QT6)
2020-07-18 04:47:54 +02:00
qt6_wrap_cpp(SINGLECOREAPP-SOURCES-MOC ${SINGLECOREAPP-MOC-HEADERS})
else()
qt5_wrap_cpp(SINGLECOREAPP-SOURCES-MOC ${SINGLECOREAPP-MOC-HEADERS})
endif()
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
)
configure_file(config.h.in "${CMAKE_CURRENT_BINARY_DIR}/config.h")