2022-06-26 23:06:31 +02:00
|
|
|
set(KDSINGLEAPPLICATION_STATIC ON)
|
|
|
|
|
2022-06-26 22:03:06 +02:00
|
|
|
set(KDSINGLEAPPLICATION_SRCS kdsingleapplication.cpp kdsingleapplication_localsocket.cpp)
|
2022-06-26 21:59:53 +02:00
|
|
|
|
2022-06-26 22:03:06 +02:00
|
|
|
set(KDSINGLEAPPLICATION_INSTALLABLE_INCLUDES kdsingleapplication.h kdsingleapplication_lib.h)
|
2022-06-26 21:59:53 +02:00
|
|
|
|
2022-06-26 22:03:06 +02:00
|
|
|
set(KDSINGLEAPPLICATION_NON_INSTALLABLE_INCLUDES kdsingleapplication_localsocket_p.h)
|
2022-06-26 21:59:53 +02:00
|
|
|
|
2022-06-26 22:03:06 +02:00
|
|
|
if(KDSINGLEAPPLICATION_STATIC)
|
2022-06-26 21:59:53 +02:00
|
|
|
add_library(kdsingleapplication STATIC ${KDSINGLEAPPLICATION_INSTALLABLE_INCLUDES} ${KDSINGLEAPPLICATION_SRCS})
|
|
|
|
target_compile_definitions(kdsingleapplication PUBLIC KDSINGLEAPPLICATION_STATIC_BUILD)
|
|
|
|
else()
|
|
|
|
add_library(kdsingleapplication SHARED ${KDSINGLEAPPLICATION_INSTALLABLE_INCLUDES} ${KDSINGLEAPPLICATION_SRCS})
|
|
|
|
target_compile_definitions(kdsingleapplication PRIVATE KDSINGLEAPPLICATION_SHARED_BUILD)
|
|
|
|
endif()
|
2022-06-26 23:06:31 +02:00
|
|
|
set_target_properties( kdsingleapplication PROPERTIES AUTOMOC TRUE )
|
2022-06-26 21:59:53 +02:00
|
|
|
|
|
|
|
set(KDSINGLEAPPLICATION_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/kdsingleapplication)
|
|
|
|
|
2022-06-26 22:03:06 +02:00
|
|
|
target_include_directories(
|
|
|
|
kdsingleapplication
|
|
|
|
PUBLIC $<INSTALL_INTERFACE:${KDSINGLEAPPLICATION_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
2022-06-26 21:59:53 +02:00
|
|
|
)
|
|
|
|
|
2023-09-03 14:17:05 +02:00
|
|
|
target_link_libraries(kdsingleapplication ${qtname}::Core ${qtname}::Network)
|