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