2021-06-22 22:30:10 +00:00
|
|
|
if(NOT MYXLIB_PREFIX STREQUAL CMAKE_BINARY_DIR)
|
|
|
|
set(MYXLIB_PREFIX
|
|
|
|
""
|
|
|
|
CACHE PATH "The path to the previx of an myxlib installation")
|
2021-06-22 14:39:47 +00:00
|
|
|
|
2021-06-22 22:30:10 +00:00
|
|
|
find_path(
|
|
|
|
MYXLIB_INCLUDE_DIRS
|
|
|
|
NAMES myx/core/config.hpp
|
|
|
|
PATHS ${MYXLIB_PREFIX}/include)
|
|
|
|
find_library(
|
|
|
|
MYXLIB_QT_LIBRARY
|
|
|
|
NAMES myx-qt
|
|
|
|
PATHS ${MYXLIB_PREFIX}/lib)
|
|
|
|
find_library(
|
|
|
|
MYXLIB_FILESYSTEM_LIBRARY
|
|
|
|
NAMES myx-filesystem
|
|
|
|
PATHS ${MYXLIB_PREFIX}/lib)
|
2021-06-22 14:39:47 +00:00
|
|
|
|
2021-06-22 22:30:10 +00:00
|
|
|
if(MYXLIB_INCLUDE_DIRS
|
|
|
|
AND MYXLIB_QT_LIBRARY
|
|
|
|
AND MYXLIB_FILESYSTEM_LIBRARY)
|
|
|
|
get_filename_component(MYXLIB_LIBRARY_DIR ${MYXLIB_QT_LIBRARY} DIRECTORY
|
|
|
|
CACHE)
|
|
|
|
set(MYXLIB_FOUND TRUE)
|
2021-06-22 14:39:47 +00:00
|
|
|
endif()
|
2021-06-22 22:30:10 +00:00
|
|
|
|
|
|
|
if(MYXLIB_FOUND)
|
|
|
|
if(NOT MYXLIB_FIND_QUIETLY)
|
|
|
|
message(STATUS "Found myxlib")
|
|
|
|
endif()
|
|
|
|
set(HAVE_MYXLIB 1)
|
|
|
|
elseif(MYXLIB_FOUND)
|
|
|
|
if(MYXLIB_FIND_REQUIRED)
|
|
|
|
message(FATAL_ERROR "Could not find myxlib")
|
|
|
|
endif()
|
2021-06-22 14:39:47 +00:00
|
|
|
endif()
|
|
|
|
endif()
|