Обновление подмодулей
This commit is contained in:
parent
11c572a96c
commit
cfe4fe8a2e
@ -1,26 +1,67 @@
|
||||
if(NOT MYXLIB_PREFIX STREQUAL CMAKE_BINARY_DIR)
|
||||
set(MYXLIB_PREFIX
|
||||
""
|
||||
CACHE PATH "The path to the previx of an myxlib installation")
|
||||
#[=======================================================================[.rst:
|
||||
FindMyxlib
|
||||
--------
|
||||
|
||||
Поиск библиотеки Myxlib
|
||||
|
||||
Входные переменные
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``MYXLIB_PREFIX``
|
||||
корневой каталог установленной библиотеки.
|
||||
``MYXLIB_INCLUDE_DIR``
|
||||
каталог, в котором производится поиск заголовочных файлов.
|
||||
``MYXLIB_LIBRARY_DIR``
|
||||
каталог, в котором производится поиск библиотек.
|
||||
|
||||
Выходные переменные
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``MYXLIB_FOUND``
|
||||
true, если MYXLIB найдена
|
||||
``MYXLIB_INCLUDE_DIRS``
|
||||
каталог с найденными заголовочными файлами
|
||||
``MYXLIB_LIBRARIES``
|
||||
каталог с найденными библиотеками
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
if(NOT MYXLIB_IS_EXTERNAL_PROJECT)
|
||||
set(MYXLIB_PREFIX "" CACHE PATH "The path to the prefix of an myxlib installation")
|
||||
set(MYXLIB_INCLUDE_DIR "" CACHE PATH "The path to the headers of an myxlib installation")
|
||||
set(MYXLIB_LIBRARY_DIR "" CACHE PATH "The path to the library of an myxlib installation")
|
||||
|
||||
set(_search_paths "")
|
||||
if(MYXLIB_INCLUDE_DIR AND EXISTS ${MYXLIB_INCLUDE_DIR})
|
||||
list(APPEND _search_paths ${MYXLIB_INCLUDE_DIR})
|
||||
endif()
|
||||
if(MYXLIB_PREFIX AND EXISTS ${MYXLIB_PREFIX})
|
||||
list(APPEND _search_paths "${MYXLIB_PREFIX}/include")
|
||||
endif()
|
||||
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)
|
||||
PATHS ${_search_paths})
|
||||
|
||||
if(MYXLIB_INCLUDE_DIRS
|
||||
AND MYXLIB_QT_LIBRARY
|
||||
AND MYXLIB_FILESYSTEM_LIBRARY)
|
||||
get_filename_component(MYXLIB_LIBRARY_DIR ${MYXLIB_QT_LIBRARY} DIRECTORY
|
||||
CACHE)
|
||||
set(_search_paths "")
|
||||
if(MYXLIB_LIBRARY_DIR AND EXISTS ${MYXLIB_LIBRARY_DIR})
|
||||
list(APPEND _search_paths ${MYXLIB_LIBRARY_DIR})
|
||||
endif()
|
||||
if(MYXLIB_PREFIX AND EXISTS ${MYXLIB_PREFIX})
|
||||
list(APPEND _search_paths "${MYXLIB_PREFIX}/lib")
|
||||
endif()
|
||||
find_library(
|
||||
MYXLIB_QT_LIBRARIES
|
||||
NAMES myx-qt
|
||||
PATHS ${_search_paths})
|
||||
find_library(
|
||||
MYXLIB_FILESYSTEM_LIBRARIES
|
||||
NAMES myx-filesystem
|
||||
PATHS ${_search_paths})
|
||||
unset(_search_paths)
|
||||
set(MYXLIB_LIBRARIES ${MYXLIB_QT_LIBRARIES} ${MYXLIB_FILESYSTEM_LIBRARIES})
|
||||
|
||||
if(MYXLIB_INCLUDE_DIRS AND MYXLIB_LIBRARIES)
|
||||
set(MYXLIB_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
|
@ -4,18 +4,18 @@ include(ExternalProject)
|
||||
# cmake-format: off
|
||||
list(APPEND _ext_project_args
|
||||
myxlib
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/myxlib
|
||||
INSTALL_DIR ${CMAKE_BINARY_DIR}
|
||||
DOWNLOAD_COMMAND ""
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
|
||||
-DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR}
|
||||
${CMLIB_EXT_PROJ_DEFAULT_ARGS}
|
||||
<SOURCE_DIR>)
|
||||
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/myxlib
|
||||
INSTALL_DIR ${CMAKE_BINARY_DIR}
|
||||
CMAKE_ARGS ${CMLIB_EXT_PROJ_DEFAULT_ARGS}
|
||||
<SOURCE_DIR>)
|
||||
if(MyxlibThirdparty_FIND_COMPONENTS STREQUAL "headers")
|
||||
list(APPEND _ext_project_args
|
||||
BUILD_COMMAND true
|
||||
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} myxlib-install-headers)
|
||||
else()
|
||||
list(APPEND _ext_project_args
|
||||
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-filesystem.a)
|
||||
endif()
|
||||
ExternalProject_Add(${_ext_project_args})
|
||||
unset(_ext_project_args)
|
||||
@ -26,15 +26,22 @@ set(MYXLIB_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
||||
set(MYXLIB_PREFIX
|
||||
${CMAKE_BINARY_DIR}
|
||||
CACHE FILEPATH "" FORCE)
|
||||
set(MYXLIB_INCLUDE_DIR
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
CACHE PATH "" FORCE)
|
||||
set(MYXLIB_INCLUDE_DIRS
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
CACHE PATH "" FORCE)
|
||||
set(MYXLIB_LIBRARY_DIR
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||
CACHE PATH "" FORCE)
|
||||
set(MYXLIB_QT_LIBRARY
|
||||
set(MYXLIB_QT_LIBRARIES
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a
|
||||
CACHE FILEPATH "" FORCE)
|
||||
set(MYXLIB_FILESYSTEM_LIBRARY
|
||||
set(MYXLIB_FILESYSTEM_LIBRARIES
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-filesystem.a
|
||||
CACHE FILEPATH "" FORCE)
|
||||
set(MYXLIB_LIBRARIES
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-filesystem.a
|
||||
CACHE FILEPATH "" FORCE)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit aea565decf680afc28ec620c3d32aadc895bc7ce
|
||||
Subproject commit 3bf9e8f14819a13149b31dc39a50a9231a8ec63c
|
Loading…
Reference in New Issue
Block a user