File tree 3 files changed +12
-6
lines changed
3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 17
17
* Add Sanitizer.cmake for gcc and clang runtime sanitizer support
18
18
* Add CoverageGcovr.cmake for gcovr support
19
19
* FindGLEW_MX considers GLEW_ROOT as environment and CMake variable
20
+ * Fix install in common_library() with subfolders
20
21
* Ignore moc and qrc files in coverage report
21
22
* Make CPACK_RESOURCE_FILE_LICENSE configurable
22
23
* New CompilerIdentification.cmake, resulted from splitting Compiler.cmake
Original file line number Diff line number Diff line change @@ -203,8 +203,8 @@ function(_common_library Name)
203
203
endif ()
204
204
205
205
# install(TARGETS ... PUBLIC_HEADER ...) flattens directories
206
- install_files (include /${INCLUDE_NAME}
207
- FILES ${PUBLIC_HEADERS} COMPONENT dev )
206
+ install_files (include /${INCLUDE_NAME} FILES ${PUBLIC_HEADERS}
207
+ COMPONENT dev BASE ${OUTPUT_INCLUDE_DIR} / ${INCLUDE_NAME} )
208
208
endfunction ()
209
209
210
210
macro (generate_library_header NAME )
Original file line number Diff line number Diff line change 1
- # Copyright (c) 2012 Stefan.Eilemann@epfl.ch
1
+ # Copyright (c) 2012-2016 Stefan.Eilemann@epfl.ch
2
2
3
- # Usage: install_files(<prefix> FILES <files> [COMPONENT <name>])
3
+ # Usage: install_files(<prefix> FILES <files> [COMPONENT <name>] [BASE <dir>] )
4
4
# Installs files while preserving their relative directory. Files
5
5
# with an absolute path are installed directly into prefix.
6
6
7
7
include (CMakeParseArguments)
8
8
9
9
function (INSTALL_FILES PREFIX )
10
- set (ARG_NAMES COMPONENT )
10
+ set (ARG_NAMES COMPONENT BASE )
11
11
set (ARGS_NAMES FILES )
12
12
cmake_parse_arguments (THIS "" "${ARG_NAMES} " "${ARGS_NAMES} " ${ARGN} )
13
13
14
14
foreach (FILE ${THIS_FILES} )
15
15
if (IS_ABSOLUTE ${FILE} )
16
- set (DIR)
16
+ if (THIS_BASE)
17
+ string (REPLACE ${THIS_BASE} "" DIR ${FILE} )
18
+ string (REGEX MATCH "(.*)[/\\ ]" DIR ${DIR} )
19
+ else ()
20
+ set (DIR)
21
+ endif ()
17
22
else ()
18
23
string (REGEX MATCH "(.*)[/\\ ]" DIR ${FILE} )
19
24
endif ()
You can’t perform that action at this time.
0 commit comments