CMakeLists: Derive the source directory grouping from targets themselves
Removes the need to store to separate SRC and HEADER variables, and then construct the target in most cases.
This commit is contained in:
parent
ee08c39b72
commit
e710a1b989
11 changed files with 361 additions and 389 deletions
14
externals/getopt/CMakeLists.txt
vendored
14
externals/getopt/CMakeLists.txt
vendored
|
@ -1,11 +1,9 @@
|
|||
set(SRCS
|
||||
getopt.c
|
||||
)
|
||||
set(HEADERS
|
||||
getopt.h
|
||||
)
|
||||
add_library(getopt
|
||||
getopt.c
|
||||
getopt.h
|
||||
)
|
||||
|
||||
create_target_directory_groups(getopt)
|
||||
|
||||
create_directory_groups(${SRCS} ${HEADERS})
|
||||
add_library(getopt ${SRCS} ${HEADERS})
|
||||
target_compile_definitions(getopt PUBLIC STATIC_GETOPT)
|
||||
target_include_directories(getopt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue