From 2286c593258ea3084353e7cf087ac62e9aa35ba2 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Thu, 5 Dec 2019 09:32:42 +0100 Subject: [PATCH] ~ fix unit tests not building --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b7dad2..bd88845 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ include_directories(lib/toml) set(LIB_PATH "${CMAKE_SOURCE_DIR}/../library") include_directories(${LIB_PATH}/include) -add_executable(TextRenderer ${SOURCES} ${HEADERS} main/main.cpp src/TextRenderer.cpp src/TextRenderer.h) +add_executable(TextRenderer ${SOURCES} ${HEADERS} main/main.cpp) target_link_libraries(TextRenderer ${LIB_PATH}/lib/liblibrary.a) @@ -35,6 +35,7 @@ target_link_libraries(TextRenderer ${LIB_PATH}/lib/liblibrary.a) enable_testing() find_package(Catch2 REQUIRED) add_executable(UnitTests ${SOURCES} ${HEADERS} ${TESTS}) +target_link_libraries(UnitTests ${LIB_PATH}/lib/liblibrary.a) target_link_libraries(UnitTests Catch2::Catch2) include(CTest)