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
|
# add subdirectories
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_subdirectory(testhelper)
|
|
||||||
add_subdirectory(connector)
|
add_subdirectory(connector)
|
||||||
|
add_subdirectory(testhelper)
|
||||||
|
|
||||||
link_directories(${LIB_SYNCTHING_CONNECTOR_BINARY_DIR})
|
link_directories(${LIB_SYNCTHING_CONNECTOR_BINARY_DIR})
|
||||||
if(NOT NO_CLI)
|
if(NOT NO_CLI)
|
||||||
add_subdirectory(cli)
|
add_subdirectory(cli)
|
||||||
|
|
|
@ -44,20 +44,16 @@ set(TS_FILES
|
||||||
)
|
)
|
||||||
|
|
||||||
# find c++utilities
|
# find c++utilities
|
||||||
find_package(c++utilities 4.8.0 REQUIRED)
|
find_package(c++utilities 4.9.0 REQUIRED)
|
||||||
use_cpp_utilities()
|
use_cpp_utilities()
|
||||||
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
|
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
|
||||||
set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static)
|
set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static)
|
||||||
|
|
||||||
# find qtutilities (only headers and CMake modules used)
|
# find qtutilities (only headers and CMake modules used)
|
||||||
find_package(qtutilities 5.0.0 REQUIRED)
|
find_package(qtutilities 5.0.0 REQUIRED)
|
||||||
include_directories(BEFORE SYSTEM ${QT_UTILITIES_INCLUDE_DIRS})
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
||||||
|
list(APPEND PRIVATE_SHARED_INCLUDE_DIRS ${QT_UTILITIES_INCLUDE_DIRS})
|
||||||
# find test helper
|
list(APPEND PRIVATE_STATIC_INCLUDE_DIRS ${QT_UTILITIES_INCLUDE_DIRS})
|
||||||
find_package(syncthingtesthelper ${META_APP_VERSION} REQUIRED)
|
|
||||||
include_directories(BEFORE SYSTEM ${SYNCTHINGTESTHELPER_INCLUDE_DIRS})
|
|
||||||
list(APPEND TEST_LIBRARIES ${SYNCTHINGTESTHELPER_LIB})
|
|
||||||
|
|
||||||
# link also explicitely against the following Qt 5 modules
|
# link also explicitely against the following Qt 5 modules
|
||||||
list(APPEND ADDITIONAL_QT_MODULES Network)
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
||||||
|
@ -87,6 +83,15 @@ include(BasicConfig)
|
||||||
include(QtConfig)
|
include(QtConfig)
|
||||||
include(WindowsResources)
|
include(WindowsResources)
|
||||||
include(LibraryTarget)
|
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(TestTarget)
|
||||||
|
|
||||||
include(Doxygen)
|
include(Doxygen)
|
||||||
include(ConfigHeader)
|
include(ConfigHeader)
|
||||||
|
|
|
@ -31,11 +31,14 @@ use_cpp_utilities()
|
||||||
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
|
set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities)
|
||||||
set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static)
|
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)
|
find_package(qtutilities 5.0.0 REQUIRED)
|
||||||
include_directories(BEFORE SYSTEM ${QT_UTILITIES_INCLUDE_DIRS})
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_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
|
# link also explicitely against the following Qt 5 modules
|
||||||
list(APPEND ADDITIONAL_QT_MODULES Network)
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue