Skip to content

Commit 4fa278b

Browse files
author
MarkusB
committed
tidy cmake
1 parent ce317b5 commit 4fa278b

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,12 @@ if(MB_CPP_LIB_TEMPLATE_HEADER_ONLY)
6262
mb.cpp-lib-template
6363
INTERFACE MB_CPP_LIB_TEMPLATE_HEADER_ONLY=1
6464
)
65-
target_sources(
66-
mb.cpp-lib-template
67-
INTERFACE
68-
FILE_SET HEADERS BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include"
69-
)
7065
set(_mb_cpp_lib_template_fs_scope INTERFACE)
7166
else()
7267
target_compile_definitions(
7368
mb.cpp-lib-template
7469
PUBLIC MB_CPP_LIB_TEMPLATE_HEADER_ONLY=0
7570
)
76-
target_sources(
77-
mb.cpp-lib-template
78-
PUBLIC FILE_SET HEADERS BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include"
79-
)
8071
set(_mb_cpp_lib_template_fs_scope PUBLIC)
8172
endif()
8273

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
file(GLOB_RECURSE headers CONFIGURE_DEPENDS "*.hpp" "*.h")
1+
file(
2+
GLOB_RECURSE headers
3+
CONFIGURE_DEPENDS
4+
"${CMAKE_CURRENT_SOURCE_DIR}/*.hpp"
5+
"${CMAKE_CURRENT_SOURCE_DIR}/*.h"
6+
)
27
target_sources(
38
mb.cpp-lib-template
49
${_mb_cpp_lib_template_fs_scope}
510
FILE_SET HEADERS
11+
BASE_DIRS
12+
"${PROJECT_SOURCE_DIR}/include"
613
FILES
714
${headers}
815
)

0 commit comments

Comments
 (0)