summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortastytea2020-01-03 15:58:41 +0100
committertastytea2020-01-03 15:58:41 +0100
commit2ec7809a7d04d85ec70b805848cdabd4283e6377 (patch)
treeaac69c1e55c01e31a2c28a678d9c37b62ea13454
parentfd7c2b3a04e87a16abe675f717e7a3dad6ad8cb2 (diff)
downloadmastodonpp-2ec7809a7d04d85ec70b805848cdabd4283e6377.tar
mastodonpp-2ec7809a7d04d85ec70b805848cdabd4283e6377.tar.gz
mastodonpp-2ec7809a7d04d85ec70b805848cdabd4283e6377.zip
Use target_sources.
-rw-r--r--src/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e5c64f6..80006e3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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}