Link testhelper against connector, remove global includes
This commit is contained in:
parent
8f672eef14
commit
f95ad68a3a
|
@ -23,8 +23,9 @@ option(NO_WIDGETS "whether building widgets should be skipped, implies NO_TRAY"
|
|||
|
||||
# add subdirectories
|
||||
enable_testing()
|
||||
add_subdirectory(testhelper)
|
||||
add_subdirectory(connector)
|
||||
add_subdirectory(testhelper)
|
||||
|
||||
link_directories(${LIB_SYNCTHING_CONNECTOR_BINARY_DIR})
|
||||
if(NOT NO_CLI)
|
||||
add_subdirectory(cli)
|
||||
|
|
|
@ -44,20 +44,16 @@ set(TS_FILES
|
|||
)
|
||||
|
||||
# find c++utilities
|
||||
find_package(c++utilities 4.8.0 REQUIRED)
|
||||
find_package(c++utilities 4.9.0 REQUIRED)
|
||||
use_cpp_utilities()
|
||||
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
|
||||
set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static)
|
||||
|
||||
# find qtutilities (only headers and CMake modules used)
|
||||
find_package(qtutilities 5.0.0 REQUIRED)
|
||||
include_directories(BEFORE SYSTEM ${QT_UTILITIES_INCLUDE_DIRS})
|
||||
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
||||
|
||||
# find test helper
|
||||
find_package(syncthingtesthelper ${META_APP_VERSION} REQUIRED)
|
||||
include_directories(BEFORE SYSTEM ${SYNCTHINGTESTHELPER_INCLUDE_DIRS})
|
||||
list(APPEND TEST_LIBRARIES ${SYNCTHINGTESTHELPER_LIB})
|
||||
list(APPEND PRIVATE_SHARED_INCLUDE_DIRS ${QT_UTILITIES_INCLUDE_DIRS})
|
||||
list(APPEND PRIVATE_STATIC_INCLUDE_DIRS ${QT_UTILITIES_INCLUDE_DIRS})
|
||||
|
||||
# link also explicitely against the following Qt 5 modules
|
||||
list(APPEND ADDITIONAL_QT_MODULES Network)
|
||||
|
@ -87,6 +83,15 @@ include(BasicConfig)
|
|||
include(QtConfig)
|
||||
include(WindowsResources)
|
||||
include(LibraryTarget)
|
||||
|
||||
# link tests against test helper (can't use find_package because testhelper target is not
|
||||
# present at this point)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
list(APPEND TEST_LIBRARIES syncthingtesthelper)
|
||||
else()
|
||||
list(APPEND TEST_LIBRARIES syncthingtesthelper_static)
|
||||
endif()
|
||||
include(TestTarget)
|
||||
|
||||
include(Doxygen)
|
||||
include(ConfigHeader)
|
||||
|
|
|
@ -31,11 +31,14 @@ use_cpp_utilities()
|
|||
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
|
||||
set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static)
|
||||
|
||||
# find qtutilities (only headers and CMake modules used)
|
||||
# find qtutilities (only CMake modules used)
|
||||
find_package(qtutilities 5.0.0 REQUIRED)
|
||||
include_directories(BEFORE SYSTEM ${QT_UTILITIES_INCLUDE_DIRS})
|
||||
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
||||
|
||||
# find syncthingconnector
|
||||
find_package(syncthingconnector ${META_APP_VERSION} REQUIRED)
|
||||
use_syncthingconnector()
|
||||
|
||||
# link also explicitely against the following Qt 5 modules
|
||||
list(APPEND ADDITIONAL_QT_MODULES Network)
|
||||
|
||||
|
|
Loading…
Reference in New Issue