File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 33# Partial path copied from build variable OPENMP_INSTALL_LIBDIR
44set ( openmp_LIB_DIR "@OPENMP_INSTALL_LIBDIR@" )
55
6- # Full path to libomp.so using OPENMP_INSTALL_PREFIX and OPENMP_INSTALL_LIBDIR partial path.
7- set_and_check( openmp_LIB_INSTALL_DIR "${PACKAGE_PREFIX_DIR} /@OPENMP_INSTALL_LIBDIR@" )
6+ # Full path to libomp.so using PACKAGE_PREFIX_DIR and OPENMP_INSTALL_LIBDIR partial path.
7+ set_and_check( openmp_LIB_INSTALL_DIR "@PACKAGE_OPENMP_INSTALL_LIBDIR@" )
8+
9+ # Full path to omp.h using PACKAGE_PREFIX and LIBOMP_HEADERS_INSTALL_PATH partial path.
10+ set_and_check( openmp_INCLUDE_DIR "@PACKAGE_LIBOMP_HEADERS_INSTALL_PATH@" )
11+ set_and_check( openmp_INCLUDE_DIRS "${openmp_INCLUDE_DIR} " )
812
913include ( "${CMAKE_CURRENT_LIST_DIR} /openmpTargets.cmake" )
Original file line number Diff line number Diff line change @@ -464,6 +464,7 @@ else()
464464 DESTINATION "${OPENMP_INSTALL_LIBDIR} " )
465465 install (EXPORT openmpTargets FILE openmpTargets.cmake NAMESPACE OpenMP::
466466 DESTINATION ${OPENMP_INSTALL_CFGDIR} /openmp)
467+ target_include_directories (omp PUBLIC $<INSTALL_INTERFACE:${LIBOMP_HEADERS_INSTALL_PATH} >)
467468 endif ()
468469
469470 # Create cmake configuration files
@@ -472,7 +473,8 @@ else()
472473 configure_package_config_file(
473474 ../openmp-config.cmake.in
474475 openmp-config.cmake
475- INSTALL_DESTINATION ${OPENMP_INSTALL_CFGDIR} /openmp )
476+ INSTALL_DESTINATION ${OPENMP_INSTALL_CFGDIR} /openmp
477+ PATH_VARS LIBOMP_HEADERS_INSTALL_PATH OPENMP_INSTALL_LIBDIR)
476478
477479 install (FILES ${CMAKE_CURRENT_BINARY_DIR} /openmp-config.cmake
478480 DESTINATION ${OPENMP_INSTALL_CFGDIR} /openmp)
You can’t perform that action at this time.
0 commit comments