Skip to content

Commit

Permalink
build: Add definitions for headers installation (#24)
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored Nov 16, 2022
1 parent 4a3fbb0 commit 9c02b29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 9c02b29

Please sign in to comment.