diff --git a/cmake/cpufeatures.cmake b/cmake/cpufeatures.cmake index 6df3c12..6989da2 100644 --- a/cmake/cpufeatures.cmake +++ b/cmake/cpufeatures.cmake @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 include(ExternalProject) -include(GNUInstallDirs) message(STATUS "configuring cpu_features") set(CPUFEATURES_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ext_cpufeatures) @@ -20,6 +19,7 @@ ExternalProject_Add( -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=lib UPDATE_COMMAND "" EXCLUDE_FROM_ALL TRUE INSTALL_COMMAND make DESTDIR=${CPUFEATURES_DESTDIR} install @@ -27,7 +27,7 @@ ExternalProject_Add( set(CPUFEATURES_INC_DIR ${CPUFEATURES_DESTDIR}/${CMAKE_INSTALL_PREFIX}/include) -set(CPUFEATURES_LIB_DIR ${CPUFEATURES_DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) +set(CPUFEATURES_LIB_DIR ${CPUFEATURES_DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib) if(IPCL_SHARED) add_library(libcpu_features INTERFACE) @@ -40,7 +40,7 @@ if(IPCL_SHARED) install( DIRECTORY ${CPUFEATURES_LIB_DIR}/ - DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cpufeatures" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cpufeatures" USE_SOURCE_PERMISSIONS ) else() diff --git a/cmake/gbenchmark.cmake b/cmake/gbenchmark.cmake index 8c3e8c6..65dc933 100644 --- a/cmake/gbenchmark.cmake +++ b/cmake/gbenchmark.cmake @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 include(ExternalProject) -include(GNUInstallDirs) set(GBENCHMARK_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ext_gbenchmark) @@ -23,6 +22,7 @@ ExternalProject_Add( -DCMAKE_INSTALL_PREFIX=${GBENCHMARK_PREFIX} -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DBENCHMARK_ENABLE_TESTING=OFF + -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release BUILD_BYPRODUCTS ${GBENCHMARK_PATHS} # Skip updates @@ -33,7 +33,7 @@ ExternalProject_Add( add_library(libgbenchmark INTERFACE) add_dependencies(libgbenchmark ext_gbenchmark) -target_link_libraries(libgbenchmark INTERFACE ${GBENCHMARK_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libbenchmark.a) +target_link_libraries(libgbenchmark INTERFACE ${GBENCHMARK_PREFIX}/lib/libbenchmark.a) target_include_directories(libgbenchmark SYSTEM INTERFACE ${GBENCHMARK_PREFIX}/include) diff --git a/cmake/gtest.cmake b/cmake/gtest.cmake index 24b80a7..b5d9dc5 100644 --- a/cmake/gtest.cmake +++ b/cmake/gtest.cmake @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 include(ExternalProject) -include(GNUInstallDirs) set(GTEST_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ext_gtest) set(GTEST_GIT_REPO_URL https://github.com/google/googletest.git) @@ -16,6 +15,7 @@ ExternalProject_Add( GIT_TAG ${GTEST_GIT_LABEL} CMAKE_ARGS ${GTEST_CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=lib UPDATE_COMMAND "" EXCLUDE_FROM_ALL TRUE INSTALL_COMMAND "" diff --git a/cmake/ippcrypto.cmake b/cmake/ippcrypto.cmake index 3650b9a..1c88bc4 100644 --- a/cmake/ippcrypto.cmake +++ b/cmake/ippcrypto.cmake @@ -32,12 +32,13 @@ ExternalProject_Add( -DCMAKE_ASM_NASM_COMPILER=nasm -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=lib UPDATE_COMMAND "" INSTALL_COMMAND make DESTDIR=${IPPCRYPTO_DESTDIR} install ) set(IPPCRYPTO_INC_DIR ${IPPCRYPTO_DESTDIR}/${CMAKE_INSTALL_PREFIX}/include) -set(IPPCRYPTO_LIB_DIR ${IPPCRYPTO_DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${IPPCRYPTO_ARCH}) +set(IPPCRYPTO_LIB_DIR ${IPPCRYPTO_DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib/${IPPCRYPTO_ARCH}) if(IPCL_SHARED) add_library(libippcrypto INTERFACE) add_dependencies(libippcrypto ext_ipp-crypto) @@ -51,7 +52,7 @@ if(IPCL_SHARED) install( DIRECTORY ${IPPCRYPTO_LIB_DIR}/ - DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/ippcrypto" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/ippcrypto" USE_SOURCE_PERMISSIONS ) else()