aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAvatar Marvin Schmidt <marv@exherbo.org> 2016-12-09 11:07:36 +0100
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-14 08:23:04 -0800
commit0ce59984ea7b871e9d052e06e2903c4c10cc77f2 (patch)
tree937dc56600fc2be14c537b35c6ea4f91624cc9a4 /cmake
parent269bfe321ee2523045f1a2ca85b7e99e8bd4c766 (diff)
downloadpaludis-0ce59984ea7b871e9d052e06e2903c4c10cc77f2.tar.gz
paludis-0ce59984ea7b871e9d052e06e2903c4c10cc77f2.tar.xz
build: Install headers generated from .se files
Change-Id: I66a5594bbce99d6fae533f967af767c9cede3457
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/PaludisAddLibrary.cmake11
-rw-r--r--cmake/modules/PaludisGeneratorUtils.cmake10
2 files changed, 18 insertions, 3 deletions
diff --git a/cmake/modules/PaludisAddLibrary.cmake b/cmake/modules/PaludisAddLibrary.cmake
index d57666c26..59268a0b7 100644
--- a/cmake/modules/PaludisAddLibrary.cmake
+++ b/cmake/modules/PaludisAddLibrary.cmake
@@ -4,7 +4,7 @@ include(PaludisGeneratorUtils)
function(paludis_add_library library_name)
set(options SHARED_LIBRARY STATIC_LIBRARY OBJECT_LIBRARY UNVERSIONED)
- set(single_value_args)
+ set(single_value_args SE_HEADERS)
set(multiple_value_args NN_SOURCES SE_SOURCES INCORPORATE_OBJECT_LIBRARIES)
cmake_parse_arguments(PAL "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
@@ -41,18 +41,25 @@ function(paludis_add_library library_name)
DEPENDS
${nndependencies})
+ set(seheaders)
set(sedependencies)
foreach(se_source ${PAL_SE_SOURCES})
paludis_seprocess(${se_source}
HEADER_TARGET
${se_source}_HEADER_TARGET
SOURCE_TARGET
- ${se_source}_SOURCE_TARGET)
+ ${se_source}_SOURCE_TARGET
+ HEADER_FILE
+ ${se_source}_HEADER_FILE)
+ list(APPEND seheaders ${${se_source}_HEADER_FILE})
list(APPEND sedependencies ${${se_source}_HEADER_TARGET};${${se_source}_SOURCE_TARGET})
endforeach()
add_custom_target(${library_name}_SE
DEPENDS
${sedependencies})
+ if(PAL_SE_HEADERS)
+ set(${PAL_SE_HEADERS} ${seheaders} PARENT_SCOPE)
+ endif()
set(object_libraries_expressions)
foreach(library ${PAL_INCORPORATE_OBJECT_LIBRARIES})
diff --git a/cmake/modules/PaludisGeneratorUtils.cmake b/cmake/modules/PaludisGeneratorUtils.cmake
index f9edcef4e..147f0c6ed 100644
--- a/cmake/modules/PaludisGeneratorUtils.cmake
+++ b/cmake/modules/PaludisGeneratorUtils.cmake
@@ -37,7 +37,7 @@ endfunction()
# TODO(compnerd) convert misc/make_se.bash into a cmake script
function(paludis_seprocess input_file)
- set(single_value_args HEADER_TARGET SOURCE_TARGET)
+ set(single_value_args HEADER_FILE HEADER_TARGET SOURCE_FILE SOURCE_TARGET)
set(multiple_value_args)
cmake_parse_arguments(PSEP "${options}" "${single_value_args}" "${multiple_value_args}" ${ARGN})
@@ -80,6 +80,14 @@ function(paludis_seprocess input_file)
"${PROJECT_SOURCE_DIR}/misc/make_se.bash"
${input_file})
add_custom_target(${source_target_name} DEPENDS ${output_source_file} COMMENT ${output_source_file})
+
+ if(PSEP_HEADER_FILE)
+ set(${PSEP_HEADER_FILE} ${output_header_file} PARENT_SCOPE)
+ endif()
+
+ if(PSEP_SOURCE_FILE)
+ set(${PSEP_SOURCE_FILE} ${output_source_file} PARENT_SCOPE)
+ endif()
endfunction()
# TODO(compnerd) convert make_nn.bash into a cmake script