summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/CMakeLists.txt45
-rw-r--r--lib/include/turns-init.h (renamed from lib/src/turns-init.h)0
-rw-r--r--lib/include/turns-participant.h (renamed from lib/src/turns-participant.h)0
-rw-r--r--lib/include/turns-turn-order.h (renamed from lib/src/turns-turn-order.h)0
-rw-r--r--lib/include/turns.h (renamed from lib/src/turns.h)0
-rw-r--r--lib/include/turnsmm.hpp (renamed from lib/src/turnsmm.hpp)4
-rw-r--r--lib/include/turnsmm/enum_helpers.hpp (renamed from lib/src/turnsmm/enum_helpers.hpp)0
-rw-r--r--lib/include/turnsmm/init.hpp (renamed from lib/src/turnsmm/init.hpp)0
-rw-r--r--lib/include/turnsmm/participant.hpp (renamed from lib/src/turnsmm/participant.hpp)0
-rw-r--r--lib/include/turnsmm/private/participant_p.hpp (renamed from lib/src/turnsmm/private/participant_p.hpp)0
-rw-r--r--lib/include/turnsmm/private/turn-order_p.hpp (renamed from lib/src/turnsmm/private/turn-order_p.hpp)0
-rw-r--r--lib/include/turnsmm/turn-order.hpp (renamed from lib/src/turnsmm/turn-order.hpp)0
12 files changed, 28 insertions, 21 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index d00e804..9389743 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -50,10 +50,10 @@ include("Catch")
# Library
set(HEADERS
- "src/turns-init.h"
- "src/turns-participant.h"
- "src/turns-turn-order.h"
- "src/turns.h"
+ "include/turns-init.h"
+ "include/turns-participant.h"
+ "include/turns-turn-order.h"
+ "include/turns.h"
)
set(SOURCES
@@ -67,7 +67,7 @@ add_library("turns::lib" ALIAS "lib")
target_sources("lib" PUBLIC
FILE_SET HEADERS
- BASE_DIRS "src"
+ BASE_DIRS "include"
FILES
${HEADERS}
)
@@ -88,7 +88,10 @@ target_compile_features("lib" PUBLIC
"cxx_std_23"
)
-target_include_directories("lib" PUBLIC "src")
+target_include_directories("lib" PUBLIC
+ "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+ "$<INSTALL_INTERFACE:include/turns>"
+)
target_link_libraries("lib" PUBLIC
"PkgConfig::glib"
@@ -100,7 +103,6 @@ set_target_properties("lib" PROPERTIES
VERSION "${PROJECT_VERSION}"
INTERPROCEDURAL_OPTIMIZATION "${TURNS_CAN_DO_IPO}"
C_EXTENSIONS OFF
- CXX_EXTENSIONS OFF
)
target_add_glib_enums("lib"
@@ -120,19 +122,22 @@ target_glib_generate_gir("lib"
enable_coverage("lib")
-install(TARGETS "lib" FILE_SET HEADERS DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/turns")
+install(TARGETS "lib"
+ FILE_SET HEADERS
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/turns-${PROJECT_VERSION_MAJOR}.0"
+)
# C++ Wrapper
set(CXX_HEADERS
- "src/turnsmm/enum_helpers.hpp"
- "src/turnsmm/init.hpp"
- "src/turnsmm/participant.hpp"
- "src/turnsmm/turn-order.hpp"
- "src/turnsmm.hpp"
+ "include/turnsmm/enum_helpers.hpp"
+ "include/turnsmm/init.hpp"
+ "include/turnsmm/participant.hpp"
+ "include/turnsmm/turn-order.hpp"
+ "include/turnsmm.hpp"
- "src/turnsmm/private/participant_p.hpp"
- "src/turnsmm/private/turn-order_p.hpp"
+ "include/turnsmm/private/participant_p.hpp"
+ "include/turnsmm/private/turn-order_p.hpp"
)
set(CXX_SOURCES
@@ -146,7 +151,7 @@ add_library("turns::mm" ALIAS "libmm")
target_sources("libmm" PUBLIC
FILE_SET HEADERS
- BASE_DIRS "src"
+ BASE_DIRS "include"
FILES
${CXX_HEADERS}
)
@@ -158,8 +163,6 @@ target_compile_options("libmm" PUBLIC
"$<$<CXX_COMPILER_ID:GNU,Clang>:-pedantic-errors>"
)
-target_include_directories("libmm" PUBLIC "src")
-
target_link_libraries("libmm" PUBLIC
"PkgConfig::glibmm"
"turns::lib"
@@ -170,13 +173,15 @@ set_target_properties("libmm" PROPERTIES
SOVERSION "${PROJECT_VERSION_MAJOR}"
VERSION "${PROJECT_VERSION}"
INTERPROCEDURAL_OPTIMIZATION "${TURNS_CAN_DO_IPO}"
- C_EXTENSIONS OFF
CXX_EXTENSIONS OFF
)
enable_coverage("libmm")
-install(TARGETS "libmm" FILE_SET HEADERS DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/turnsmm")
+install(TARGETS "libmm"
+ FILE_SET HEADERS
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/turnsmm-${PROJECT_VERSION_MAJOR}.0"
+)
# Tests
diff --git a/lib/src/turns-init.h b/lib/include/turns-init.h
index dc96fc5..dc96fc5 100644
--- a/lib/src/turns-init.h
+++ b/lib/include/turns-init.h
diff --git a/lib/src/turns-participant.h b/lib/include/turns-participant.h
index 28588a7..28588a7 100644
--- a/lib/src/turns-participant.h
+++ b/lib/include/turns-participant.h
diff --git a/lib/src/turns-turn-order.h b/lib/include/turns-turn-order.h
index 5e34405..5e34405 100644
--- a/lib/src/turns-turn-order.h
+++ b/lib/include/turns-turn-order.h
diff --git a/lib/src/turns.h b/lib/include/turns.h
index ed6a0bf..ed6a0bf 100644
--- a/lib/src/turns.h
+++ b/lib/include/turns.h
diff --git a/lib/src/turnsmm.hpp b/lib/include/turnsmm.hpp
index e0b6d3a..07c6045 100644
--- a/lib/src/turnsmm.hpp
+++ b/lib/include/turnsmm.hpp
@@ -3,9 +3,11 @@
* SPDX-License-Identifier: LGPL-2.1-only
*/
- #ifndef TURNSMM_HPP
+#ifndef TURNSMM_HPP
#define TURNSMM_HPP
+#include "turnsmm/init.hpp" // IWYU pragma: export
#include "turnsmm/participant.hpp" // IWYU pragma: export
+#include "turnsmm/turn-order.hpp" // IWYU pragma: export
#endif \ No newline at end of file
diff --git a/lib/src/turnsmm/enum_helpers.hpp b/lib/include/turnsmm/enum_helpers.hpp
index 60b8cd7..60b8cd7 100644
--- a/lib/src/turnsmm/enum_helpers.hpp
+++ b/lib/include/turnsmm/enum_helpers.hpp
diff --git a/lib/src/turnsmm/init.hpp b/lib/include/turnsmm/init.hpp
index c22b4c9..c22b4c9 100644
--- a/lib/src/turnsmm/init.hpp
+++ b/lib/include/turnsmm/init.hpp
diff --git a/lib/src/turnsmm/participant.hpp b/lib/include/turnsmm/participant.hpp
index 6dece0e..6dece0e 100644
--- a/lib/src/turnsmm/participant.hpp
+++ b/lib/include/turnsmm/participant.hpp
diff --git a/lib/src/turnsmm/private/participant_p.hpp b/lib/include/turnsmm/private/participant_p.hpp
index d0f4f0d..d0f4f0d 100644
--- a/lib/src/turnsmm/private/participant_p.hpp
+++ b/lib/include/turnsmm/private/participant_p.hpp
diff --git a/lib/src/turnsmm/private/turn-order_p.hpp b/lib/include/turnsmm/private/turn-order_p.hpp
index d694b3e..d694b3e 100644
--- a/lib/src/turnsmm/private/turn-order_p.hpp
+++ b/lib/include/turnsmm/private/turn-order_p.hpp
diff --git a/lib/src/turnsmm/turn-order.hpp b/lib/include/turnsmm/turn-order.hpp
index 5b8deb9..5b8deb9 100644
--- a/lib/src/turnsmm/turn-order.hpp
+++ b/lib/include/turnsmm/turn-order.hpp