From 82a407a0e3985b3ff3246d38b9ccc0b00cacb05b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 18 Oct 2020 00:35:18 +0300 Subject: cmake: files are per-directory, not per-extension --- CMakeLists.txt | 8 ++++---- test/unit_tests/CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0244ce4..c4a839b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,10 +4,10 @@ project(winapi_common CXX) include(cmake/common.cmake) -file(GLOB winapi_common_cpp "src/*.cpp") -file(GLOB_RECURSE winapi_common_hpp "include/*.hpp") -add_library(winapi_common ${winapi_common_cpp} ${winapi_common_hpp}) -target_include_directories(winapi_common PUBLIC include/) +file(GLOB_RECURSE winapi_common_include "include/*.hpp") +file(GLOB winapi_common_src "src/*.cpp") +add_library(winapi_common ${winapi_common_include} ${winapi_common_src}) +target_include_directories(winapi_common PUBLIC include) add_subdirectory(3rdparty/winapi/utf8 EXCLUDE_FROM_ALL) target_link_libraries(winapi_common PRIVATE winapi_utf8) diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index 8aaa6d3..fb87230 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -1,5 +1,5 @@ -file(GLOB unit_tests_files "*.cpp" "*.h" "*.hpp" "*.rc") -add_executable(unit_tests ${unit_tests_files}) +file(GLOB unit_tests_src "*.cpp" "*.h" "*.hpp" "*.rc") +add_executable(unit_tests ${unit_tests_src}) set_target_properties(unit_tests PROPERTIES OUTPUT_NAME winapi-common-unit-tests) target_link_libraries(unit_tests PRIVATE winapi_common winapi_utf8) -- cgit v1.2.3