~ fix unit tests not building

This commit is contained in:
Johannes Theiner 2019-12-05 09:32:42 +01:00
parent efe8c62493
commit 2286c59325
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,7 @@ include_directories(lib/toml)
set(LIB_PATH "${CMAKE_SOURCE_DIR}/../library") set(LIB_PATH "${CMAKE_SOURCE_DIR}/../library")
include_directories(${LIB_PATH}/include) 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) target_link_libraries(TextRenderer ${LIB_PATH}/lib/liblibrary.a)
@ -35,6 +35,7 @@ target_link_libraries(TextRenderer ${LIB_PATH}/lib/liblibrary.a)
enable_testing() enable_testing()
find_package(Catch2 REQUIRED) find_package(Catch2 REQUIRED)
add_executable(UnitTests ${SOURCES} ${HEADERS} ${TESTS}) add_executable(UnitTests ${SOURCES} ${HEADERS} ${TESTS})
target_link_libraries(UnitTests ${LIB_PATH}/lib/liblibrary.a)
target_link_libraries(UnitTests Catch2::Catch2) target_link_libraries(UnitTests Catch2::Catch2)
include(CTest) include(CTest)