diff --git a/CMakeLists.txt b/CMakeLists.txt index de50c72aa3..61f149f468 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,9 +205,6 @@ else() set(LIB_INSTALL_DIR lib) endif() -include_directories(include/) -include_directories(library/) - if(ENABLE_ZLIB_SUPPORT) find_package(ZLIB) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 39a7a2cd0e..182109b519 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -48,7 +48,10 @@ function(add_test_suite suite_name) add_executable(test_suite_${data_name} test_suite_${data_name}.c $) target_link_libraries(test_suite_${data_name} ${libs}) - target_include_directories(test_suite_${data_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) + target_include_directories(test_suite_${data_name} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../library) + if(${data_name} MATCHES ${SKIP_TEST_SUITES_REGEX}) message(STATUS "The test suite ${data_name} will not be executed.") else() @@ -68,7 +71,10 @@ endif(MSVC) file(GLOB MBEDTESTS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c) add_library(mbedtests OBJECT ${MBEDTESTS_FILES}) -target_include_directories(mbedtests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) +target_include_directories(mbedtests + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../library) add_test_suite(aes aes.cbc) add_test_suite(aes aes.cfb)