summaryrefslogtreecommitdiff
path: root/cmake/include.cmake
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2025-12-23 11:59:45 +0100
committerSander Vrijders <sander@ouroboros.rocks>2026-01-07 10:00:06 +0100
commit48c294105f5123dc876fbad199ec1e0166d82a18 (patch)
treec49ce8ac75a7d63c10ea1ff960eeff750c680a8e /cmake/include.cmake
parent145be13e8c18fcb39476d8f65fed23d82320f22f (diff)
downloadouroboros-48c294105f5123dc876fbad199ec1e0166d82a18.tar.gz
ouroboros-48c294105f5123dc876fbad199ec1e0166d82a18.zip
build: Refactor CMake modules
This moves the CMake build logic out of the source tree and splits it up into a more modular form. The tests now have a CMakeLists.txt file in their respective source directory. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'cmake/include.cmake')
-rw-r--r--cmake/include.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/include.cmake b/cmake/include.cmake
new file mode 100644
index 00000000..c14d205d
--- /dev/null
+++ b/cmake/include.cmake
@@ -0,0 +1,28 @@
+set(HEADERS_SOURCE_DIR "${CMAKE_SOURCE_DIR}/include/ouroboros")
+
+set(SOCK_BUF_SIZE 10240 CACHE STRING
+ "Size of the buffer used by the UNIX sockets for local IPC")
+
+configure_file("${CMAKE_SOURCE_DIR}/include/ouroboros/version.h.in"
+ "${CMAKE_BINARY_DIR}/include/ouroboros/version.h" @ONLY)
+
+configure_file("${CMAKE_SOURCE_DIR}/include/ouroboros/sockets.h.in"
+ "${CMAKE_BINARY_DIR}/include/ouroboros/sockets.h" @ONLY)
+
+set(PUBLIC_HEADER_FILES
+ ${HEADERS_SOURCE_DIR}/cep.h
+ ${HEADERS_SOURCE_DIR}/cdefs.h
+ ${HEADERS_SOURCE_DIR}/dev.h
+ ${HEADERS_SOURCE_DIR}/errno.h
+ ${HEADERS_SOURCE_DIR}/fccntl.h
+ ${HEADERS_SOURCE_DIR}/fqueue.h
+ ${HEADERS_SOURCE_DIR}/ipcp.h
+ ${HEADERS_SOURCE_DIR}/irm.h
+ ${HEADERS_SOURCE_DIR}/name.h
+ ${HEADERS_SOURCE_DIR}/proto.h
+ ${HEADERS_SOURCE_DIR}/qos.h
+ ${CMAKE_BINARY_DIR}/include/ouroboros/version.h
+ )
+
+install(FILES ${PUBLIC_HEADER_FILES}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ouroboros)