Skip to content

Commit

Permalink
Fix Cmake Lib.
Browse files Browse the repository at this point in the history
Signed-off-by: MtoLStoN <[email protected]>
  • Loading branch information
MtoLStoN committed Mar 4, 2024
1 parent 814b2e4 commit 91d31fb
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 11 deletions.
19 changes: 19 additions & 0 deletions config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,22 @@ install(
"${CMAKE_CURRENT_SOURCE_DIR}/modules/"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)

include(CMakePackageConfigHelpers)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake"
VERSION "${PROJECT_VERSION}"
COMPATIBILITY SameMinorVersion
)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)

4 changes: 2 additions & 2 deletions config/modules/Findmctc-lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ if(NOT DEFINED "${_pkg}_FIND_METHOD")
set("_${_pkg}_FIND_METHOD")
endif()

include("${CMAKE_CURRENT_LIST_DIR}/xtb-utils.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cpcm-x-utils.cmake")

xtb_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")
cpcmx_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")

if(DEFINED "_${_pkg}_FIND_METHOD")
unset("${_pkg}_FIND_METHOD")
Expand Down
4 changes: 2 additions & 2 deletions config/modules/Findnumsa.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ if(NOT DEFINED "${_pkg}_FIND_METHOD")
set("_${_pkg}_FIND_METHOD")
endif()

include("${CMAKE_CURRENT_LIST_DIR}/xtb-utils.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cpcm-x-utils.cmake")

xtb_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")
cpcmx_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")

if(DEFINED "_${_pkg}_FIND_METHOD")
unset("${_pkg}_FIND_METHOD")
Expand Down
4 changes: 2 additions & 2 deletions config/modules/Findtblite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ if(NOT DEFINED "${_pkg}_FIND_METHOD")
set("_${_pkg}_FIND_METHOD")
endif()

include("${CMAKE_CURRENT_LIST_DIR}/xtb-utils.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cpcm-x-utils.cmake")

xtb_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")
cpcmx_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")

if(DEFINED "_${_pkg}_FIND_METHOD")
unset("${_pkg}_FIND_METHOD")
Expand Down
4 changes: 2 additions & 2 deletions config/modules/Findtest-drive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ if(NOT DEFINED "${_pkg}_FIND_METHOD")
set("_${_pkg}_FIND_METHOD")
endif()

include("${CMAKE_CURRENT_LIST_DIR}/xtb-utils.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cpcm-x-utils.cmake")

xtb_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")
cpcmx_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")

if(DEFINED "_${_pkg}_FIND_METHOD")
unset("${_pkg}_FIND_METHOD")
Expand Down
4 changes: 2 additions & 2 deletions config/modules/Findtoml-f.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ if(NOT DEFINED "${_pkg}_FIND_METHOD")
set("_${_pkg}_FIND_METHOD")
endif()

include("${CMAKE_CURRENT_LIST_DIR}/xtb-utils.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cpcm-x-utils.cmake")

xtb_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")
cpcmx_find_package("${_lib}" "${${_pkg}_FIND_METHOD}" "${_url}")

if(DEFINED "_${_pkg}_FIND_METHOD")
unset("${_pkg}_FIND_METHOD")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# Handling of subproject dependencies
macro(
"xtb_find_package"
"cpcmx_find_package"
package
methods
url
Expand Down

0 comments on commit 91d31fb

Please sign in to comment.