Use target_sources.
This commit is contained in:
parent
fd7c2b3a04
commit
2ec7809a7d
|
@ -1,9 +1,12 @@
|
|||
include(GNUInstallDirs)
|
||||
|
||||
add_library(${PROJECT_NAME})
|
||||
|
||||
file(GLOB_RECURSE sources_lib *.cpp)
|
||||
file(GLOB_RECURSE headers_lib ../include/*.hpp)
|
||||
|
||||
add_library(${PROJECT_NAME} "${sources_lib}" "${headers_lib}")
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE "${sources_lib}"
|
||||
PUBLIC "${headers_lib}")
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
VERSION ${PROJECT_VERSION}
|
||||
|
|
Loading…
Reference in New Issue
Block a user