2023-09-05 00:16:30 +00:00
|
|
|
# common macros
|
|
|
|
# this file will also load platform specific macros
|
|
|
|
|
|
|
|
# platform specific macros
|
|
|
|
if(WIN32)
|
|
|
|
include(${CMAKE_MODULE_PATH}/macros/windows.cmake)
|
|
|
|
elseif(UNIX)
|
|
|
|
include(${CMAKE_MODULE_PATH}/macros/unix.cmake)
|
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
include(${CMAKE_MODULE_PATH}/macros/macos.cmake)
|
|
|
|
else()
|
|
|
|
include(${CMAKE_MODULE_PATH}/macros/linux.cmake)
|
|
|
|
endif()
|
|
|
|
endif()
|
2024-06-14 21:37:46 +00:00
|
|
|
|
|
|
|
# override find_package function
|
|
|
|
macro(find_package) # cmake-lint: disable=C0103
|
|
|
|
string(TOLOWER "${ARGV0}" ARGV0_LOWER)
|
|
|
|
if(
|
|
|
|
(("${ARGV0_LOWER}" STREQUAL "boost") AND DEFINED FETCH_CONTENT_BOOST_USED) OR
|
2024-06-16 00:21:18 +00:00
|
|
|
(("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED EXTERNAL_PROJECT_LIBEVDEV_USED)
|
2024-06-14 21:37:46 +00:00
|
|
|
)
|
|
|
|
# Do nothing, as the package has already been fetched
|
|
|
|
else()
|
|
|
|
# Call the original find_package function
|
|
|
|
_find_package(${ARGV})
|
|
|
|
endif()
|
|
|
|
endmacro()
|