Ionobase
This commit is contained in:
parent
253bcbedb2
commit
ba94a2f8b7
29
FindIonobase.cmake
Normal file
29
FindIonobase.cmake
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
if(NOT LIBIONOBASE_PREFIX STREQUAL CMAKE_BINARY_DIR)
|
||||||
|
set(LIBIONOBASE_PREFIX "" CACHE PATH "The path to the previx of an libionobase installation")
|
||||||
|
|
||||||
|
find_path(
|
||||||
|
LIBIONOBASE_INCLUDE_DIRS
|
||||||
|
NAMES preprocmath/params.hpp
|
||||||
|
PATHS ${LIBIONOBASE_PREFIX}/include)
|
||||||
|
find_library(
|
||||||
|
LIBIONOBASE_LIBRARY
|
||||||
|
NAMES preprocmath
|
||||||
|
PATHS ${LIBIONOBASE_PREFIX}/lib)
|
||||||
|
|
||||||
|
if(LIBIONOBASE_INCLUDE_DIRS AND LIBIONOBASE_LIBRARY)
|
||||||
|
get_filename_component(LIBIONOBASE_LIBRARY_DIR ${LIBIONOBASE_LIBRARY}
|
||||||
|
DIRECTORY CACHE)
|
||||||
|
set(LIBIONOBASE_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(LIBIONOBASE_FOUND)
|
||||||
|
if(NOT LIBIONOBASE_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found libionobase")
|
||||||
|
endif()
|
||||||
|
set(HAVE_LIBIONOBASE 1)
|
||||||
|
elseif(LIBIONOBASE_FOUND)
|
||||||
|
if(LIBIONOBASE_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find libionobase")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
39
FindIonobaseThirdparty.cmake
Normal file
39
FindIonobaseThirdparty.cmake
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Подключение внешних проектов
|
||||||
|
include(ExternalProject)
|
||||||
|
|
||||||
|
if(${IonobaseThirdparty_FIND_COMPONENTS} STREQUAL "headers")
|
||||||
|
ExternalProject_Add(
|
||||||
|
libionobase
|
||||||
|
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libionobase
|
||||||
|
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 ionobase-install-headers)
|
||||||
|
else()
|
||||||
|
ExternalProject_Add(
|
||||||
|
libionobase
|
||||||
|
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libionobase
|
||||||
|
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(LIBIONOBASE_PREFIX
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
CACHE FILEPATH "" FORCE)
|
||||||
|
set(LIBIONOBASE_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(LIBIONOBASE_LIBRARY_DIR
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(LIBIONOBASE_LIBRARY
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libionobase.a
|
||||||
|
CACHE FILEPATH "" FORCE)
|
Loading…
Reference in New Issue
Block a user