diff --git a/cmake/Modules/FindCheck.cmake b/cmake/Modules/FindCheck.cmake index a46482d..6418fd1 100644 --- a/cmake/Modules/FindCheck.cmake +++ b/cmake/Modules/FindCheck.cmake @@ -49,7 +49,7 @@ IF( NOT CHECK_FOUND AND NOT PKG_CONFIG_FOUND ) MESSAGE( STATUS "Could NOT find CHECK" ) ENDIF ( NOT Check_FIND_QUIETLY ) ENDIF ( Check_FIND_REQUIRED ) - ENDIF ( CHECK_INCLUDE_DIRS AND CHECK_LIBRARIES ) + ENDIF ( CHECK_INCLUDE_DIRS AND CHECK_LIBRARY ) ENDIF( NOT CHECK_FOUND AND NOT PKG_CONFIG_FOUND ) # Hide advanced variables from CMake GUIs diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1b9dc2d..1775d80 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,6 +2,7 @@ function(add_r3_test NAME) add_executable(${NAME} ${ARGN}) if(WIN32) + set(CHECK_LDFLAGS ${CHECK_LIBRARIES}) target_compile_definitions(${NAME} PRIVATE _CRT_SECURE_NO_WARNINGS @@ -15,7 +16,7 @@ function(add_r3_test NAME) ${PROJECT_SOURCE_DIR}/src) target_link_libraries(${NAME} - ${CHECK_LIBRARIES} + ${CHECK_LDFLAGS} r3) add_test(NAME ${NAME} COMMAND ${NAME})