cmake-find/FindIonobaseThirdparty.cmake

41 lines
1.3 KiB
CMake
Raw Normal View History

2021-06-22 23:11:10 +00:00
# Подключение внешних проектов
include(ExternalProject)
2021-06-24 09:03:01 +00:00
# cmake-format: off
list(APPEND _ext_project_args
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>)
if(IonobaseThirdparty_FIND_COMPONENTS STREQUAL "headers")
list(APPEND _ext_project_args
BUILD_COMMAND true
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} ionobase-install-headers)
2021-06-22 23:11:10 +00:00
endif()
2021-06-24 09:03:01 +00:00
ExternalProject_Add(${_ext_project_args})
unset(_ext_project_args)
set(IONOBASE_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
2021-06-24 09:03:01 +00:00
# cmake-format: on
2021-06-22 23:11:10 +00:00
set(IONOBASE_PREFIX
2021-06-22 23:11:10 +00:00
${CMAKE_BINARY_DIR}
CACHE FILEPATH "" FORCE)
set(IONOBASE_INCLUDE_DIR
2021-07-01 10:41:32 +00:00
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/ionobase
2021-06-22 23:11:10 +00:00
CACHE PATH "" FORCE)
set(IONOBASE_INCLUDE_DIRS
2021-07-01 10:41:32 +00:00
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/ionobase
CACHE PATH "" FORCE)
set(IONOBASE_LIBRARY_DIR
2021-06-22 23:11:10 +00:00
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
CACHE PATH "" FORCE)
set(IONOBASE_LIBRARIES
2021-06-22 23:11:10 +00:00
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libionobase.a
CACHE FILEPATH "" FORCE)