Fixed some build issues with arch
This commit is contained in:
@@ -9,9 +9,8 @@ set(BOOST_COMPONENTS
|
|||||||
locale
|
locale
|
||||||
log
|
log
|
||||||
program_options
|
program_options
|
||||||
system
|
|
||||||
)
|
)
|
||||||
# system is not used by Sunshine, but by Simple-Web-Server, added here for convenience
|
# boost_system is header-only since Boost 1.69 and has no compiled library since 1.89+
|
||||||
|
|
||||||
# algorithm, preprocessor, scope, and uuid are not used by Sunshine, but by libdisplaydevice, added here for convenience
|
# algorithm, preprocessor, scope, and uuid are not used by Sunshine, but by libdisplaydevice, added here for convenience
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@@ -101,3 +100,12 @@ endif()
|
|||||||
|
|
||||||
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
|
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
|
||||||
message(STATUS "Boost libraries: ${Boost_LIBRARIES}")
|
message(STATUS "Boost libraries: ${Boost_LIBRARIES}")
|
||||||
|
|
||||||
|
# boost_system is header-only since Boost 1.69 and has no compiled library in 1.89+.
|
||||||
|
# Create a stub INTERFACE target for backward compatibility (e.g., Simple-Web-Server).
|
||||||
|
if(NOT TARGET Boost::system)
|
||||||
|
add_library(Boost::system IMPORTED INTERFACE GLOBAL)
|
||||||
|
if(TARGET Boost::headers)
|
||||||
|
target_link_libraries(Boost::system INTERFACE Boost::headers)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ macro(find_package) # cmake-lint: disable=C0103
|
|||||||
(("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED EXTERNAL_PROJECT_LIBEVDEV_USED)
|
(("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED EXTERNAL_PROJECT_LIBEVDEV_USED)
|
||||||
)
|
)
|
||||||
# Do nothing, as the package has already been fetched
|
# Do nothing, as the package has already been fetched
|
||||||
|
elseif("${ARGV0_LOWER}" STREQUAL "boost_system" AND Boost_FOUND)
|
||||||
|
# boost_system is header-only since Boost 1.69 with no compiled library in 1.89+.
|
||||||
|
# BoostConfig.cmake calls find_package(boost_system) internally; intercept it here
|
||||||
|
# and report success so BoostConfig.cmake accepts Boost::system as a valid target.
|
||||||
|
set(boost_system_FOUND TRUE) # cmake-lint: disable=C0103
|
||||||
|
set(boost_system_VERSION "${Boost_VERSION}") # cmake-lint: disable=C0103
|
||||||
else()
|
else()
|
||||||
# Call the original find_package function
|
# Call the original find_package function
|
||||||
_find_package(${ARGV})
|
_find_package(${ARGV})
|
||||||
|
|||||||
Reference in New Issue
Block a user