Skip to content

Commit

Permalink
Fix building with -DBUILD_TESTING=ON -DBUILD_BINDINGS=OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
ufleisch committed Mar 24, 2024
1 parent 0896fb9 commit ddf7523
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,20 @@ SET(test_runner_SRCS
test_dsdiff.cpp
test_sizes.cpp
test_versionnumber.cpp
test_tag_c.cpp
)
IF(BUILD_BINDINGS)
SET(test_runner_SRCS ${test_runner_SRCS}
test_tag_c.cpp
)
ENDIF()

INCLUDE_DIRECTORIES(${CPPUNIT_INCLUDE_DIR})

ADD_EXECUTABLE(test_runner ${test_runner_SRCS})
TARGET_LINK_LIBRARIES(test_runner tag tag_c ${CPPUNIT_LIBRARIES})
TARGET_LINK_LIBRARIES(test_runner tag ${CPPUNIT_LIBRARIES})
IF(BUILD_BINDINGS)
TARGET_LINK_LIBRARIES(test_runner tag_c)
ENDIF()

ADD_TEST(test_runner test_runner)
ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} -V
Expand Down

0 comments on commit ddf7523

Please sign in to comment.