From 7547dfeaa78018a48fc2c007b2f1a6ce5f045f86 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Fri, 6 Dec 2024 07:16:36 +0100 Subject: [PATCH] fixing path issue --- CMakeLists.txt | 1 + cmake/DAGMC_macros.cmake | 2 +- cmake/MOAB_PullAndMake.cmake | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ba74aff9..e10f92685 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ project(DAGMC) cmake_minimum_required(VERSION 3.18) enable_language(CXX) +include(GNUInstallDirs) # Set DAGMC version set(DAGMC_MAJOR_VERSION 3) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index a9e7ea5e9..567a13f3c 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -254,7 +254,7 @@ macro (dagmc_install_library lib_name) # Required to ensure that MOAB is built before DAGMC and to properly link against MOAB if(DDL_INSTALL_DEPS) add_dependencies(${lib_name}-shared MOAB) - target_link_libraries(${lib_name}-shared PUBLIC ${MOAB_INSTALL_PREFIX}/lib64/libMOAB.so) + target_link_libraries(${lib_name}-shared PUBLIC ${MOAB_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libMOAB.so) endif() endif () diff --git a/cmake/MOAB_PullAndMake.cmake b/cmake/MOAB_PullAndMake.cmake index bcfbadd15..fdf06820f 100644 --- a/cmake/MOAB_PullAndMake.cmake +++ b/cmake/MOAB_PullAndMake.cmake @@ -5,7 +5,6 @@ MACRO (moab_pull_make moab_version) message(STATUS "MOAB will be downloaded and built") include(ExternalProject) message("HDF5_ROOT: ${HDF5_ROOT}") - set(CMAKE_INSTALL_LIBDIR "lib") SET(MOAB_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/moab") set(MOAB_ROOT "${CMAKE_BINARY_DIR}/moab") set(MOAB_INCLUDE_DIRS "${MOAB_INSTALL_PREFIX}/include") @@ -31,7 +30,7 @@ MACRO (moab_pull_make moab_version) add_library(MOAB INTERFACE) target_include_directories(MOAB SYSTEM INTERFACE ${MOAB_INCLUDE_DIRS}) - target_link_libraries(MOAB INTERFACE ${MOAB_INSTALL_PREFIX}/lib64/libMOAB.so) + target_link_libraries(MOAB INTERFACE ${MOAB_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libMOAB.so) add_dependencies(MOAB MOAB_ep) install(TARGETS MOAB LIBRARY DESTINATION ${MOAB_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})