From 9c02b299f84260a8ca804acdf9e3a1f4d6a7fac0 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Wed, 16 Nov 2022 12:26:54 -0600 Subject: [PATCH] build: Add definitions for headers installation (#24) Signed-off-by: Hiroshi Hatake Signed-off-by: Hiroshi Hatake --- CMakeLists.txt | 3 +++ include/CMakeLists.txt | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 include/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d65a47..5ebb231 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,12 +128,15 @@ endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(CFL_INSTALL_BINDIR "bin") set(CFL_INSTALL_LIBDIR "lib") + set(CFL_INSTALL_INCLUDEDIR "include") else() set(CFL_INSTALL_BINDIR ${CMAKE_INSTALL_FULL_BINDIR}) set(CFL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") + set(CFL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include") endif() # CFL sources +add_subdirectory(include) add_subdirectory(src) # Tests diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 0000000..b08804d --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1,5 @@ +file(GLOB cflHeaders "cfl/*.h") +install(FILES ${cflHeaders} + DESTINATION ${CFL_INSTALL_INCLUDEDIR}/cfl + COMPONENT headers + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)