@@ -176,6 +176,19 @@ file(GLOB_RECURSE TEMP_GLOB_RES "${NBL_ROOT_PATH}/include/*.h")
176
176
set (NABLA_HEADERS_PUBLIC ${NABLA_HEADERS_PUBLIC} ${TEMP_GLOB_RES} )
177
177
file (GLOB_RECURSE TEMP_GLOB_RES "${NBL_ROOT_PATH} /include/*.tcc" )
178
178
set (NABLA_HEADERS_PUBLIC ${NABLA_HEADERS_PUBLIC} ${TEMP_GLOB_RES} )
179
+ file (GLOB_RECURSE TEMP_GLOB_RES "${NBL_ROOT_PATH} /src/*.h" )
180
+ set (NABLA_HEADERS_PUBLIC2 ${NABLA_HEADERS_PUBLIC2} ${TEMP_GLOB_RES} ) # TODO: we should have moved all headers from src directory to /include, but we need it for install target
181
+
182
+ foreach (NBL_CURRENT_HEADER IN LISTS NABLA_HEADERS_PUBLIC2 )
183
+ cmake_path (GET NBL_CURRENT_HEADER PARENT_PATH NBL_CURRENT_HEADER_DIR )
184
+ file (RELATIVE_PATH NBL_TMP_REL_DESTINATION "${NBL_ROOT_PATH} /src" ${NBL_CURRENT_HEADER_DIR} )
185
+
186
+ install (FILES ${NBL_CURRENT_HEADER} DESTINATION include /${NBL_TMP_REL_DESTINATION} CONFIGURATIONS Release )
187
+ install (FILES ${NBL_CURRENT_HEADER} DESTINATION debug/include/${NBL_TMP_REL_DESTINATION} CONFIGURATIONS Debug )
188
+ install (FILES ${NBL_CURRENT_HEADER} DESTINATION relwithdebinfo/include/${NBL_TMP_REL_DESTINATION} CONFIGURATIONS RelWithDebInfo )
189
+ endforeach ()
190
+
191
+ unset (NABLA_HEADERS_PUBLIC2 ${NBL_TMP_FULL_PATHS} )
179
192
180
193
file (GLOB_RECURSE NABLA_HEADERS_PRIV1 "*.h" )
181
194
file (GLOB_RECURSE NABLA_HEADERS_PRIV2 "${NBL_ROOT_PATH} /src/nbl/*.h" )
@@ -647,7 +660,6 @@ start_tracking_variables_for_propagation_to_parent()
647
660
add_subdirectory (ext )
648
661
propagate_changed_variables_to_parent_scope ()
649
662
650
-
651
663
set (NABLA_HEADERS_TO_INSTALL
652
664
${NABLA_HEADERS_PUBLIC}
653
665
)
@@ -665,6 +677,12 @@ nbl_install_headers("${NABLA_HEADERS_TO_INSTALL}" "${NBL_ROOT_PATH}/include")
665
677
nbl_install_headers ("${NABLA_HEADERS_TO_INSTALL_SOURCE_REFACTOR} " "${NBL_ROOT_PATH} /source/Nabla" )
666
678
nbl_install_config_header (BuildConfigOptions.h )
667
679
680
+ macro (nbl_install_program _TRGT )
681
+ install (PROGRAMS $< TARGET_FILE:${_TRGT} > DESTINATION lib CONFIGURATIONS Release )
682
+ install (PROGRAMS $< TARGET_FILE:${_TRGT} > DESTINATION debug/lib CONFIGURATIONS Debug )
683
+ install (PROGRAMS $< TARGET_FILE:${_TRGT} > DESTINATION relwithdebinfo/lib CONFIGURATIONS RelWithDebInfo )
684
+ endmacro ()
685
+
668
686
macro (nbl_install_lib _TRGT )
669
687
install (TARGETS ${_TRGT} ARCHIVE DESTINATION lib CONFIGURATIONS Release )
670
688
install (TARGETS ${_TRGT} ARCHIVE DESTINATION debug/lib CONFIGURATIONS Debug )
@@ -709,7 +727,7 @@ nbl_install_lib(zlibstatic)
709
727
nbl_install_lib (simdjson )
710
728
nbl_install_lib (volk )
711
729
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
712
- nbl_install_lib (tbb )
713
- nbl_install_lib (tbbmalloc )
714
- nbl_install_lib (tbbmalloc_proxy )
730
+ nbl_install_program (tbb )
731
+ nbl_install_program (tbbmalloc )
732
+ nbl_install_program (tbbmalloc_proxy )
715
733
endif ()
0 commit comments