mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-22 21:48:03 +01:00
32 lines
725 B
CMake
32 lines
725 B
CMake
cmake_minimum_required(VERSION 2.8.11)
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
set(SINGLEAPP-SOURCES
|
|
qtlocalpeer.cpp
|
|
qtsingleapplication.cpp
|
|
qtsinglecoreapplication.cpp
|
|
)
|
|
|
|
set(SINGLEAPP-MOC-HEADERS
|
|
qtlocalpeer.h
|
|
qtsingleapplication.h
|
|
qtsinglecoreapplication.h
|
|
)
|
|
|
|
if(UNIX)
|
|
set(SINGLEAPP-SOURCES ${SINGLEAPP-SOURCES} qtlockedfile_unix.cpp)
|
|
elseif(WIN32)
|
|
set(SINGLEAPP-SOURCES ${SINGLEAPP-SOURCES} qtlockedfile_win.cpp)
|
|
endif()
|
|
|
|
QT5_WRAP_CPP(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS})
|
|
|
|
ADD_LIBRARY(qtsingleapplication STATIC
|
|
${SINGLEAPP-SOURCES}
|
|
${SINGLEAPP-SOURCES-MOC}
|
|
)
|
|
|
|
target_link_libraries(qtsingleapplication Qt5::Core Qt5::Widgets Qt5::Network)
|
|
|
|
include_directories(${CMAKE_BINARY_DIR}/src)
|