Compare commits
2 Commits
aa9e44b01f
...
253bcbedb2
Author | SHA1 | Date | |
---|---|---|---|
253bcbedb2 | |||
4487851535 |
@ -1,21 +1,37 @@
|
|||||||
set(MYXLIB_PREFIX "" CACHE PATH "The path to the previx of an myxlib installation")
|
if(NOT MYXLIB_PREFIX STREQUAL CMAKE_BINARY_DIR)
|
||||||
|
set(MYXLIB_PREFIX
|
||||||
|
""
|
||||||
|
CACHE PATH "The path to the previx of an myxlib installation")
|
||||||
|
|
||||||
find_path(MYXLIB_INCLUDE_DIRS NAMES myx/core/config.hpp PATHS ${MYXLIB_PREFIX}/include)
|
find_path(
|
||||||
find_library(MYXLIB_QT_LIBRARY NAMES myx-qt PATHS ${MYXLIB_PREFIX}/lib)
|
MYXLIB_INCLUDE_DIRS
|
||||||
find_library(MYXLIB_FILESYSTEM_LIBRARY NAMES myx-filesystem PATHS ${MYXLIB_PREFIX}/lib)
|
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)
|
||||||
|
|
||||||
if(MYXLIB_INCLUDE_DIRS AND MYXLIB_QT_LIBRARY AND MYXLIB_FILESYSTEM_LIBRARY)
|
if(MYXLIB_INCLUDE_DIRS
|
||||||
get_filename_component(MYXLIB_LIBRARY_DIR ${MYXLIB_QT_LIBRARY} DIRECTORY CACHE)
|
AND MYXLIB_QT_LIBRARY
|
||||||
set(MYXLIB_FOUND TRUE)
|
AND MYXLIB_FILESYSTEM_LIBRARY)
|
||||||
endif()
|
get_filename_component(MYXLIB_LIBRARY_DIR ${MYXLIB_QT_LIBRARY} DIRECTORY
|
||||||
|
CACHE)
|
||||||
if(MYXLIB_FOUND)
|
set(MYXLIB_FOUND TRUE)
|
||||||
if(NOT MYXLIB_FIND_QUIETLY)
|
|
||||||
MESSAGE(STATUS "Found myxlib")
|
|
||||||
endif()
|
endif()
|
||||||
set(HAVE_MYXLIB 1)
|
|
||||||
elseif(MYXLIB_FOUND)
|
if(MYXLIB_FOUND)
|
||||||
if(MYXLIB_FIND_REQUIRED)
|
if(NOT MYXLIB_FIND_QUIETLY)
|
||||||
message(FATAL_ERROR "Could not find myxlib")
|
message(STATUS "Found myxlib")
|
||||||
|
endif()
|
||||||
|
set(HAVE_MYXLIB 1)
|
||||||
|
elseif(MYXLIB_FOUND)
|
||||||
|
if(MYXLIB_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find myxlib")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -2,16 +2,27 @@
|
|||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
myxlib
|
myxlib
|
||||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/myxlib
|
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/myxlib
|
||||||
INSTALL_DIR ${CMAKE_BINARY_DIR}
|
INSTALL_DIR ${CMAKE_BINARY_DIR}
|
||||||
DOWNLOAD_COMMAND ""
|
DOWNLOAD_COMMAND ""
|
||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR} ${CMLIB_EXT_PROJ_DEFAULT_ARGS} <SOURCE_DIR>
|
CONFIGURE_COMMAND
|
||||||
BUILD_COMMAND true
|
${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR}
|
||||||
)
|
${CMLIB_EXT_PROJ_DEFAULT_ARGS} <SOURCE_DIR>
|
||||||
|
BUILD_COMMAND true)
|
||||||
|
|
||||||
set(MYXLIB_PREFIX ${CMAKE_BINARY_DIR} CACHE FILEPATH "" FORCE)
|
set(MYXLIB_PREFIX
|
||||||
set(MYXLIB_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "" FORCE)
|
${CMAKE_BINARY_DIR}
|
||||||
set(MYXLIB_LIBRARY_DIR ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} CACHE PATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
set(MYXLIB_QT_LIBRARY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a CACHE FILEPATH "" FORCE)
|
set(MYXLIB_INCLUDE_DIRS
|
||||||
set(MYXLIB_FILESYSTEM_LIBRARY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-filesystem.a CACHE FILEPATH "" FORCE)
|
${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
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a
|
||||||
|
CACHE FILEPATH "" FORCE)
|
||||||
|
set(MYXLIB_FILESYSTEM_LIBRARY
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-filesystem.a
|
||||||
|
CACHE FILEPATH "" FORCE)
|
||||||
|
29
FindPreprocmath.cmake
Normal file
29
FindPreprocmath.cmake
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
if(NOT LIBPREPROCMATH_PREFIX STREQUAL CMAKE_BINARY_DIR)
|
||||||
|
set(LIBPREPROCMATH_PREFIX "" CACHE PATH "The path to the previx of an libpreprocmath installation")
|
||||||
|
|
||||||
|
find_path(
|
||||||
|
LIBPREPROCMATH_INCLUDE_DIRS
|
||||||
|
NAMES preprocmath/params.hpp
|
||||||
|
PATHS ${LIBPREPROCMATH_PREFIX}/include)
|
||||||
|
find_library(
|
||||||
|
LIBPREPROCMATH_LIBRARY
|
||||||
|
NAMES preprocmath
|
||||||
|
PATHS ${LIBPREPROCMATH_PREFIX}/lib)
|
||||||
|
|
||||||
|
if(LIBPREPROCMATH_INCLUDE_DIRS AND LIBPREPROCMATH_LIBRARY)
|
||||||
|
get_filename_component(LIBPREPROCMATH_LIBRARY_DIR ${LIBPREPROCMATH_LIBRARY}
|
||||||
|
DIRECTORY CACHE)
|
||||||
|
set(LIBPREPROCMATH_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(LIBPREPROCMATH_FOUND)
|
||||||
|
if(NOT LIBPREPROCMATH_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found libpreprocmath")
|
||||||
|
endif()
|
||||||
|
set(HAVE_LIBPREPROCMATH 1)
|
||||||
|
elseif(LIBPREPROCMATH_FOUND)
|
||||||
|
if(LIBPREPROCMATH_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find libpreprocmath")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
39
FindPreprocmathThirdparty.cmake
Normal file
39
FindPreprocmathThirdparty.cmake
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Подключение внешних проектов
|
||||||
|
include(ExternalProject)
|
||||||
|
|
||||||
|
if(${PreprocmathThirdparty_FIND_COMPONENTS} STREQUAL "headers")
|
||||||
|
ExternalProject_Add(
|
||||||
|
libpreprocmath
|
||||||
|
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libpreprocmath
|
||||||
|
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>
|
||||||
|
BUILD_COMMAND true
|
||||||
|
INSTALL_COMMAND make preprocmath-install-headers)
|
||||||
|
else()
|
||||||
|
ExternalProject_Add(
|
||||||
|
libpreprocmath
|
||||||
|
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libpreprocmath
|
||||||
|
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>)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(LIBPREPROCMATH_PREFIX
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
CACHE FILEPATH "" FORCE)
|
||||||
|
set(LIBPREPROCMATH_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(LIBPREPROCMATH_LIBRARY_DIR
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(LIBPREPROCMATH_LIBRARY
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libpreprocmath.a
|
||||||
|
CACHE FILEPATH "" FORCE)
|
Loading…
Reference in New Issue
Block a user