pica/cmake/FindFCGI.cmake

29 lines
912 B
CMake
Raw Normal View History

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 ()