Skip to content
Snippets Groups Projects
Commit 9d464e1a authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

fix public header paths

parent 9006a699
No related branches found
No related tags found
No related merge requests found
set(namespace "fggl")
cmake_minimum_required(VERSION 3.13)
set(namespace "fggl")
......@@ -15,6 +16,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(GNUInstallDirs)
target_include_directories(${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
......@@ -75,15 +77,16 @@ add_subdirectory(demo)
# INSTALL PHASE
# see https://decovar.dev/blog/2021/03/08/cmake-cpp-library/
##
set(public_headers
${CMAKE_CURRENT_SOURCE_DIR}/include/fggl/fggl.hpp
file(GLOB_RECURSE public_headers
${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/*.hpp
${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/*.h
)
# Structure preserving header macro
include(GNUInstallDirs)
#include(CMakePrintHelpers)
# Structure preserving header macro
foreach(header ${public_headers})
file(RELATIVE_PATH header_file_path "${CMAKE_CURRENT_SOURCE_DIR}" "${header}")
file(RELATIVE_PATH header_file_path "${CMAKE_CURRENT_SOURCE_DIR}/include" "${header}")
get_filename_component(header_directory_path "${header_file_path}" DIRECTORY)
install(
FILES ${header}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment