aboutsummaryrefslogtreecommitdiff
path: root/3rd-party/SingleApplication/CMakeLists.txt
blob: 97fe7d7fd08d85e8792111d3de7efa3d738a8c5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
#set(CMAKE_AUTOUIC ON)
#set(CMAKE_AUTORCC ON)

add_library(SingleApplication
    SingleApplication.git/singleapplication.cpp
    SingleApplication.git/singleapplication.h
    SingleApplication.git/singleapplication_p.cpp
    SingleApplication.git/singleapplication_p.h
)

target_include_directories(SingleApplication PUBLIC SingleApplication.git)

target_link_libraries(SingleApplication
    Qt5::Core Qt5::Network Qt5::Widgets
)

target_compile_definitions(SingleApplication
    PRIVATE QAPPLICATION_CLASS=QApplication
)

if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
    target_link_libraries(SingleApplication
        Advapi32
    )
endif()