diff --git a/cmake/libpoly.cmake b/cmake/libpoly.cmake index 83343892..b465919b 100644 --- a/cmake/libpoly.cmake +++ b/cmake/libpoly.cmake @@ -50,12 +50,10 @@ find_package(CairoFC REQUIRED) if (ENABLE_ALSA) find_package(ALSA REQUIRED) - set(ALSA_VERSION ${ALSA_VERSION_STRING}) endif() if (ENABLE_CURL) find_package(CURL REQUIRED) - set(CURL_VERSION ${CURL_VERSION_STRING}) endif() if (ENABLE_MPD) diff --git a/cmake/modules/FindALSA.cmake b/cmake/modules/FindALSA.cmake new file mode 100644 index 00000000..742f8ea6 --- /dev/null +++ b/cmake/modules/FindALSA.cmake @@ -0,0 +1,14 @@ +# This module defines an imported target `ALSA::ALSA` if alsa is found +# +# Defines the following Variables (see find_package_impl for more info): +# ALSA_FOUND +# ALSA_INCLUDE_DIR +# ALSA_INCLUDE_DIRS +# ALSA_LIBRARY +# ALSA_LIBRARIES +# ALSA_VERSION +find_package_impl("alsa" "ALSA" "alsa/asoundlib.h") + +if(ALSA_FOUND AND NOT TARGET ALSA::ALSA) + create_imported_target("ALSA::ALSA" "${ALSA_INCLUDE_DIR}" "${ALSA_LIBRARY}") +endif() diff --git a/cmake/modules/FindCURL.cmake b/cmake/modules/FindCURL.cmake new file mode 100644 index 00000000..2d13b380 --- /dev/null +++ b/cmake/modules/FindCURL.cmake @@ -0,0 +1,14 @@ +# This module defines an imported target `CURL::libcurl` if libcurl is found +# +# Defines the following Variables (see find_package_impl for more info): +# CURL_FOUND +# CURL_INCLUDE_DIR +# CURL_INCLUDE_DIRS +# CURL_LIBRARY +# CURL_LIBRARIES +# CURL_VERSION +find_package_impl("libcurl" "CURL" "curl/curl.h") + +if(CURL_FOUND AND NOT TARGET CURL::libcurl) + create_imported_target("CURL::libcurl" "${CURL_INCLUDE_DIR}" "${CURL_LIBRARY}") +endif()