2021-02-12 11:36:42 +01:00
|
|
|
find_path(IrcCore_INCLUDE_DIR irc.h PATH_SUFFIXES IrcCore)
|
2021-02-12 17:21:04 +01:00
|
|
|
find_library(IrcCore_LIBRARY Core)
|
2021-02-12 11:36:42 +01:00
|
|
|
|
2021-02-21 13:55:45 +01:00
|
|
|
find_path(IrcModel_INCLUDE_DIR ircmodel.h PATH_SUFFIXES IrcModel)
|
2021-02-12 17:21:04 +01:00
|
|
|
find_library(IrcModel_LIBRARY Model)
|
2021-02-12 11:36:42 +01:00
|
|
|
|
|
|
|
find_path(IrcUtil_INCLUDE_DIR ircutil.h PATH_SUFFIXES IrcUtil)
|
2021-02-12 17:21:04 +01:00
|
|
|
find_library(IrcUtil_LIBRARY Util)
|
2021-02-12 11:36:42 +01:00
|
|
|
|
|
|
|
set(LibCommuni_INCLUDE_DIRS ${IrcCore_INCLUDE_DIR} ${IrcModel_INCLUDE_DIR} ${IrcUtil_INCLUDE_DIR})
|
|
|
|
set(LibCommuni_LIBRARIES ${IrcCore_LIBRARY} ${IrcModel_LIBRARY} ${IrcUtil_LIBRARY})
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(LibCommuni
|
2021-02-13 10:40:27 +01:00
|
|
|
DEFAULT_MSG IrcCore_LIBRARY IrcModel_LIBRARY IrcUtil_LIBRARY IrcCore_INCLUDE_DIR IrcModel_INCLUDE_DIR IrcUtil_INCLUDE_DIR
|
2021-02-12 11:36:42 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
if (LibCommuni_FOUND)
|
|
|
|
add_library(LibCommuni::LibCommuni INTERFACE IMPORTED)
|
|
|
|
set_target_properties(LibCommuni::LibCommuni PROPERTIES
|
|
|
|
INTERFACE_LINK_LIBRARIES "${LibCommuni_LIBRARIES}"
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${LibCommuni_INCLUDE_DIRS}"
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
|
2021-02-12 17:21:04 +01:00
|
|
|
mark_as_advanced(LibCommuni_INCLUDE_DIRS LibCommuni_LIBRARIES
|
2021-02-12 11:36:42 +01:00
|
|
|
IrcCore_LIBRARY IrcModel_LIBRARY IrcUtil_LIBRARY
|
|
|
|
IrcCore_INCLUDE_DIR IrcModel_INCLUDE_DIR IrcUtil_INCLUDE_DIR)
|