2015-06-11 12:10:07 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8.11)
|
2018-12-05 15:02:01 +01:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
|
2015-04-16 15:06:00 +02:00
|
|
|
|
|
|
|
set(SINGLEAPP-SOURCES
|
|
|
|
qtlocalpeer.cpp
|
|
|
|
qtsingleapplication.cpp
|
|
|
|
qtsinglecoreapplication.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SINGLEAPP-MOC-HEADERS
|
|
|
|
qtlocalpeer.h
|
|
|
|
qtsingleapplication.h
|
|
|
|
qtsinglecoreapplication.h
|
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(SINGLEAPP-SOURCES ${SINGLEAPP-SOURCES} qtlockedfile_win.cpp)
|
|
|
|
elseif(WIN32)
|
|
|
|
set(SINGLEAPP-SOURCES ${SINGLEAPP-SOURCES} qtlockedfile_unix.cpp)
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
QT5_WRAP_CPP(SINGLEAPP-SOURCES-MOC ${SINGLEAPP-MOC-HEADERS})
|
|
|
|
|
|
|
|
ADD_LIBRARY(qtsingleapplication STATIC
|
|
|
|
${SINGLEAPP-SOURCES}
|
|
|
|
${SINGLEAPP-SOURCES-MOC}
|
|
|
|
)
|
|
|
|
|
2018-04-16 01:05:32 +02:00
|
|
|
target_link_libraries(qtsingleapplication Qt5::Core Qt5::Widgets Qt5::Network)
|