unit testing: Link test executables against libdfhack

Note: Hard-coded "SDL" here is wrong, but requires some refactoring in
top-level CMakeLists.txt to fix.
develop
Tim Siegel 2022-04-21 10:42:19 -04:00
parent 26a9bf9671
commit 6daa13ad51
No known key found for this signature in database
GPG Key ID: 856AC2B87AB8474E
1 changed files with 4 additions and 6 deletions

@ -84,12 +84,10 @@ set(MAIN_SOURCES
if(BUILD_TESTS) if(BUILD_TESTS)
# TODO Make a function or macro for this # TODO Make a function or macro for this
add_executable( add_executable(MiscUtils.test MiscUtils.test.cpp)
MiscUtils.test # FIXME Hard-coded "SDL" works on Linux, but probably isn't portable
MiscUtils.test.cpp target_link_libraries(MiscUtils.test dfhack SDL)
MiscUtils.cpp) add_test(NAME MiscUtils.test COMMAND MiscUtils.test)
add_test(NAME MiscUtils.test
COMMAND MiscUtils.test)
endif() endif()
if(WIN32) if(WIN32)