Skip to content

Commit a8e49c7

Browse files
committed
build BUGFIX test src used by the lib
1 parent 0822e99 commit a8e49c7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int np2_server_test_stop(void);")
8888
int np2_${TEST}(int argc, char *argv[]);")
8989
endforeach()
9090

91-
add_library(netopeer2_lib_test OBJECT "${TEST_SRC_DIR}/${TEST_SRC}")
91+
add_library(netopeer2_lib_test OBJECT ${TEST_SRC})
9292
target_compile_definitions(netopeer2_lib_test PRIVATE NETOPEER2_LIB)
9393

9494
include_directories(${TEST_BIN_DIR})

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ include_directories(SYSTEM ${CMOCKA_INCLUDE_DIR})
3737
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
3838
include_directories(${CMAKE_CURRENT_BINARY_DIR})
3939

40-
# base test source
41-
set(TEST_SRC "np2_test.c" "np2_other_client.c")
40+
# base test source (absolute path, used by the lib as well)
41+
set(TEST_SRC "${CMAKE_CURRENT_SOURCE_DIR}/np2_test.c" "${CMAKE_CURRENT_SOURCE_DIR}/np2_other_client.c")
4242

4343
# list of all the tests
4444
set(TESTS test_rpc test_edit test_filter test_subscribe_filter test_subscribe_param test_parallel_sessions

0 commit comments

Comments
 (0)