File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,6 @@ endif()
26
26
27
27
option (BUILD_SHARED_LIBS "build shared libraries" ON )
28
28
29
- option (FOUNDATION_PATH_TO_XCTEST_BUILD "Path to XCTest build" "" )
30
-
31
29
find_package (CURL CONFIG )
32
30
if (CURL_FOUND )
33
31
include (CMakeExpandImportedTargets )
@@ -58,6 +56,7 @@ add_subdirectory(uuid)
58
56
add_subdirectory (Foundation )
59
57
add_subdirectory (Tools )
60
58
if (ENABLE_TESTING )
59
+ find_package (XCTest CONFIG REQUIRED )
61
60
add_subdirectory (TestFoundation )
62
61
endif ()
63
62
Original file line number Diff line number Diff line change 1
1
2
- if (CMAKE_VERSION VERSION_LESS 3.16 )
3
- set (CMAKE_LINK_LIBRARY_FLAG "-l" )
4
- endif ()
5
-
6
2
add_subdirectory (xdgTestHelper )
7
3
8
4
add_executable (TestFoundation
@@ -112,10 +108,6 @@ target_link_libraries(TestFoundation PRIVATE
112
108
Foundation
113
109
FoundationNetworking
114
110
FoundationXML )
115
- target_include_directories (TestFoundation PRIVATE
116
- ${FOUNDATION_PATH_TO_XCTEST_BUILD} /swift )
117
- target_link_directories (TestFoundation PRIVATE
118
- ${FOUNDATION_PATH_TO_XCTEST_BUILD} )
119
111
target_link_libraries (TestFoundation PRIVATE
120
112
XCTest )
121
113
@@ -179,5 +171,5 @@ add_test(NAME TestFoundation
179
171
COMMAND ${CMAKE_BINARY_DIR} /TestFoundation.app/TestFoundation
180
172
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} /TestFoundation.app )
181
173
set_tests_properties (TestFoundation PROPERTIES
182
- ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/TestFoundation.app:${FOUNDATION_PATH_TO_XCTEST_BUILD} :$<TARGET_LINKER_FILE_DIR:dispatch>:$<TARGET_LINKER_FILE_DIR:swiftDispatch>:$<TARGET_LINKER_FILE_DIR:BlocksRuntime> )
174
+ ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/TestFoundation.app:$<TARGET_LINKER_FILE_DIR:XCTest> :$<TARGET_LINKER_FILE_DIR:dispatch>:$<TARGET_LINKER_FILE_DIR:swiftDispatch>:$<TARGET_LINKER_FILE_DIR:BlocksRuntime> )
183
175
You can’t perform that action at this time.
0 commit comments