aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/modules/PaludisAddLibrary.cmake11
-rw-r--r--cmake/modules/PaludisGeneratorUtils.cmake10
-rw-r--r--paludis/CMakeLists.txt5
-rw-r--r--paludis/util/CMakeLists.txt10
4 files changed, 26 insertions, 10 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
diff --git a/paludis/CMakeLists.txt b/paludis/CMakeLists.txt
index 98e545eb7..a2c55fa2e 100644
--- a/paludis/CMakeLists.txt
+++ b/paludis/CMakeLists.txt
@@ -203,7 +203,9 @@ paludis_add_library(libpaludis
"${CMAKE_CURRENT_SOURCE_DIR}/tar_merger.se"
"${CMAKE_CURRENT_SOURCE_DIR}/user_dep_spec.se"
"${CMAKE_CURRENT_SOURCE_DIR}/version_operator.se"
- "${CMAKE_CURRENT_SOURCE_DIR}/version_spec.se")
+ "${CMAKE_CURRENT_SOURCE_DIR}/version_spec.se"
+ SE_HEADERS
+ libpaludis_SE_HEADERS)
target_link_libraries(libpaludis
PRIVATE
libpaludisselinux
@@ -477,6 +479,7 @@ install(FILES
"${CMAKE_CURRENT_SOURCE_DIR}/version_requirements.hh"
"${CMAKE_CURRENT_SOURCE_DIR}/version_spec-fwd.hh"
"${CMAKE_CURRENT_SOURCE_DIR}/version_spec.hh"
+ ${libpaludis_SE_HEADERS}
DESTINATION
"${CMAKE_INSTALL_FULL_INCLUDEDIR}/paludis-${PALUDIS_PKG_CONFIG_SLOT}/paludis")
install(PROGRAMS
diff --git a/paludis/util/CMakeLists.txt b/paludis/util/CMakeLists.txt
index 1d8da433e..cc376573f 100644
--- a/paludis/util/CMakeLists.txt
+++ b/paludis/util/CMakeLists.txt
@@ -73,7 +73,9 @@ paludis_add_library(libpaludisutil
"${CMAKE_CURRENT_SOURCE_DIR}/fs_iterator.se"
"${CMAKE_CURRENT_SOURCE_DIR}/fs_path.se"
"${CMAKE_CURRENT_SOURCE_DIR}/is_file_with_extension.se"
- "${CMAKE_CURRENT_SOURCE_DIR}/log.se")
+ "${CMAKE_CURRENT_SOURCE_DIR}/log.se"
+ SE_HEADERS
+ libpaludisutil_SE_HEADERS)
add_dependencies(libpaludisutil ${paludis_util_hh_TARGET})
target_link_libraries(libpaludisutil
PRIVATE
@@ -296,11 +298,7 @@ install(FILES
"${CMAKE_CURRENT_SOURCE_DIR}/wrapped_value-fwd.hh"
"${CMAKE_CURRENT_SOURCE_DIR}/wrapped_value-impl.hh"
"${CMAKE_CURRENT_SOURCE_DIR}/wrapped_value.hh"
- "${CMAKE_CURRENT_BINARY_DIR}/config_file-se.hh"
- "${CMAKE_CURRENT_BINARY_DIR}/fs_iterator-se.hh"
- "${CMAKE_CURRENT_BINARY_DIR}/fs_path-se.hh"
- "${CMAKE_CURRENT_BINARY_DIR}/is_file_with_extension-se.hh"
- "${CMAKE_CURRENT_BINARY_DIR}/log-se.hh"
+ ${libpaludisutil_SE_HEADERS}
DESTINATION
"${CMAKE_INSTALL_FULL_INCLUDEDIR}/paludis-${PALUDIS_PKG_CONFIG_SLOT}/paludis/util")
install(PROGRAMS