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
9699194b54
commit
ab021d163e
14 changed files with 735 additions and 767 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