Skip to content

Commit

Permalink
make ARCH_INDEPENDENT libraries to have CMake configs installed to share
Browse files Browse the repository at this point in the history
  • Loading branch information
Arniiiii committed Aug 20, 2024
1 parent 2d8a468 commit 9f9872d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ function(packageProject)
endif()
endif()

set(INSTALL_DIR_FOR_CMAKE_CONFIGS ${CMAKE_INSTALL_LIBDIR})
if(PROJECT_ARCH_INDEPENDENT)
set(wbpvf_extra_args ARCH_INDEPENDENT)
set(INSTALL_DIR_FOR_CMAKE_CONFIGS ${CMAKE_INSTALL_DATADIR}) # share
endif()

write_basic_package_version_file(
Expand All @@ -141,7 +143,7 @@ function(packageProject)
)

set("${PROJECT_NAME}_INSTALL_CMAKEDIR"
"${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}${PROJECT_VERSION_SUFFIX}"
"${INSTALL_DIR_FOR_CMAKE_CONFIGS}/cmake/${PROJECT_NAME}${PROJECT_VERSION_SUFFIX}"
CACHE PATH "CMake package config location relative to the install prefix"
)

Expand Down

0 comments on commit 9f9872d

Please sign in to comment.