aboutsummaryrefslogtreecommitdiff
path: root/source/lib/std_ext/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/std_ext/CMakeLists.txt')
-rw-r--r--source/lib/std_ext/CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/lib/std_ext/CMakeLists.txt b/source/lib/std_ext/CMakeLists.txt
new file mode 100644
index 0000000..e6e3372
--- /dev/null
+++ b/source/lib/std_ext/CMakeLists.txt
@@ -0,0 +1,29 @@
+cmake_path(GET CMAKE_CURRENT_SOURCE_DIR STEM LIB_NAME)
+
+file(GLOB_RECURSE LIB_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" CONFIGURE_DEPENDS "**/*.hpp")
+
+add_library("wanda-${LIB_NAME}" INTERFACE)
+
+target_sources("wanda-${LIB_NAME}" INTERFACE
+ FILE_SET HEADERS
+ FILES ${LIB_HEADERS}
+ BASE_DIRS "include"
+)
+
+target_include_directories("wanda-${LIB_NAME}" INTERFACE
+ "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+)
+
+target_include_directories("wanda-${LIB_NAME}" SYSTEM INTERFACE
+ "$<INSTALL_INTERFACE:include>"
+)
+
+target_compile_features("wanda-${LIB_NAME}" INTERFACE
+ "cxx_std_20"
+)
+
+install(TARGETS "wanda-${LIB_NAME}"
+ FILE_SET HEADERS
+)
+
+add_library("wanda::${LIB_NAME}" ALIAS "wanda-${LIB_NAME}")