2023-12-30 22:42:11 +00:00
|
|
|
#SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
|
|
#SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-11-29 13:09:11 +00:00
|
|
|
find_library(FCGI_LIBRARIES fcgi NAMES FCGI libfcgi)
|
|
|
|
find_library(FCGI++_LIBRARIES fcgi++ NAMES FCGI++ libfcgi++)
|
|
|
|
|
|
|
|
if (FCGI_LIBRARIES AND FCGI++_LIBRARIES)
|
|
|
|
set(FCGI_FOUND TRUE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (FCGI_FOUND)
|
|
|
|
add_library(FCGI::FCGI SHARED IMPORTED)
|
|
|
|
set_target_properties(FCGI::FCGI PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${FCGI_LIBRARIES}"
|
|
|
|
INTERFACE_LINK_LIBRARIES "${FCGI_LIBRARIES}"
|
|
|
|
)
|
|
|
|
add_library(FCGI::FCGI++ SHARED IMPORTED)
|
|
|
|
set_target_properties(FCGI::FCGI++ PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${FCGI++_LIBRARIES}"
|
|
|
|
INTERFACE_LINK_LIBRARIES "${FCGI++_LIBRARIES}"
|
|
|
|
)
|
|
|
|
|
|
|
|
if (NOT FCGI_FIND_QUIETLY)
|
|
|
|
message(STATUS "Found FCGI library: ${FCGI_LIBRARIES}")
|
|
|
|
message(STATUS "Found FCGI++ library: ${FCGI++_LIBRARIES}")
|
|
|
|
endif ()
|
|
|
|
else ()
|
|
|
|
if (FCGI_FIND_REQUIRED)
|
|
|
|
message(FATAL_ERROR "Could NOT find FCGI development files")
|
|
|
|
endif ()
|
|
|
|
endif ()
|