2018-02-27 18:06:05 +01:00
|
|
|
cmake_minimum_required(VERSION 2.8.11)
|
2018-05-14 17:57:37 +02:00
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
set(SINGLEAPP-SOURCES
|
|
|
|
qtlocalpeer.cpp
|
|
|
|
qtsingleapplication.cpp
|
|
|
|
qtsinglecoreapplication.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SINGLEAPP-MOC-HEADERS
|
|
|
|
qtlocalpeer.h
|
|
|
|
qtsingleapplication.h
|
|
|
|
qtsinglecoreapplication.h
|
|
|
|
)
|
|
|
|
|
2018-11-28 17:44:45 +01:00
|
|
|
if(UNIX)
|
2018-02-27 18:06:05 +01:00
|
|
|
set(SINGLEAPP-SOURCES ${SINGLEAPP-SOURCES} qtlockedfile_unix.cpp)
|
2018-11-28 17:44:45 +01:00
|
|
|
elseif(WIN32)
|
|
|
|
set(SINGLEAPP-SOURCES ${SINGLEAPP-SOURCES} qtlockedfile_win.cpp)
|
|
|
|
endif()
|
2018-02-27 18:06:05 +01:00
|
|
|
|
|
|
|
QT5_WRAP_CPP(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS})
|
|
|
|
|
|
|
|
ADD_LIBRARY(qtsingleapplication STATIC
|
|
|
|
${SINGLEAPP-SOURCES}
|
|
|
|
${SINGLEAPP-SOURCES-MOC}
|
|
|
|
)
|
|
|
|
|
2018-05-12 20:30:16 +02:00
|
|
|
target_link_libraries(qtsingleapplication Qt5::Core Qt5::Widgets Qt5::Network)
|
2018-09-15 13:07:51 +02:00
|
|
|
|
|
|
|
include_directories(${CMAKE_BINARY_DIR}/src)
|