46 lines
1.7 KiB
CMake
46 lines
1.7 KiB
CMake
if(NOT MYX_NOTIFICATIONS_IS_EXTERNAL_PROJECT)
|
|
set(MYX_NOTIFICATIONS_PREFIX "" CACHE PATH "The path to the prefix of an myx-notifications installation")
|
|
set(MYX_NOTIFICATIONS_INCLUDE_DIR "" CACHE PATH "The path to the headers of an myx-notifications installation")
|
|
set(MYX_NOTIFICATIONS_LIBRARY_DIR "" CACHE PATH "The path to the library of an myx-notifications installation")
|
|
|
|
set(_search_paths "")
|
|
if(MYX_NOTIFICATIONS_INCLUDE_DIR AND EXISTS ${MYX_NOTIFICATIONS_INCLUDE_DIR})
|
|
list(APPEND _search_paths ${MYX_NOTIFICATIONS_INCLUDE_DIR})
|
|
endif()
|
|
if(MYX_NOTIFICATIONS_PREFIX AND EXISTS ${MYX_NOTIFICATIONS_PREFIX})
|
|
list(APPEND _search_paths "${MYX_NOTIFICATIONS_PREFIX}/include")
|
|
endif()
|
|
find_path(
|
|
MYX_NOTIFICATIONS_INCLUDE_DIRS
|
|
NAMES myx/notifications/widget.hpp
|
|
PATHS ${_search_paths})
|
|
|
|
set(_search_paths "")
|
|
if(MYX_NOTIFICATIONS_LIBRARY_DIR AND EXISTS ${MYX_NOTIFICATIONS_LIBRARY_DIR})
|
|
list(APPEND _search_paths ${MYX_NOTIFICATIONS_LIBRARY_DIR})
|
|
endif()
|
|
if(MYX_NOTIFICATIONS_PREFIX AND EXISTS ${MYX_NOTIFICATIONS_PREFIX})
|
|
list(APPEND _search_paths "${MYX_NOTIFICATIONS_PREFIX}/lib")
|
|
endif()
|
|
find_library(
|
|
MYX_NOTIFICATIONS_LIBRARIES
|
|
NAMES myx-notifications
|
|
PATHS ${_search_paths})
|
|
unset(_search_paths)
|
|
|
|
if(MYX_NOTIFICATIONS_INCLUDE_DIRS AND MYX_NOTIFICATIONS_LIBRARIES)
|
|
set(MYX_NOTIFICATIONS_FOUND TRUE)
|
|
endif()
|
|
|
|
if(MYX_NOTIFICATIONS_FOUND)
|
|
if(NOT MYX_NOTIFICATIONS_FIND_QUIETLY)
|
|
message(STATUS "Found myx-notifications")
|
|
endif()
|
|
set(HAVE_MYX_NOTIFICATIONS 1)
|
|
elseif(MYX_NOTIFICATIONS_FOUND)
|
|
if(MYX_NOTIFICATIONS_FIND_REQUIRED)
|
|
message(FATAL_ERROR "Could not find myx-notifications")
|
|
endif()
|
|
endif()
|
|
endif()
|