Стандартизация имён переменных, правка поиска
This commit is contained in:
parent
aebd1d3088
commit
ffd19aa94d
45
FindFsp.cmake
Normal file
45
FindFsp.cmake
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
if(NOT FSP_IS_EXTERNAL_PROJECT)
|
||||||
|
set(FSP_PREFIX "" CACHE PATH "The path to the prefix of an libfsp installation")
|
||||||
|
set(FSP_INCLUDE_DIR "" CACHE PATH "The path to the headers of an libfsp installation")
|
||||||
|
set(FSP_LIBRARY_DIR "" CACHE PATH "The path to the library of an libfsp installation")
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS FSP_INCLUDE_DIR)
|
||||||
|
list(APPEND _search_paths ${FSP_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS FSP_PREFIX)
|
||||||
|
list(APPEND _search_paths ${FSP_PREFIX}/include)
|
||||||
|
endif()
|
||||||
|
find_path(
|
||||||
|
FSP_INCLUDE_DIRS
|
||||||
|
NAMES fsp/mods.hpp
|
||||||
|
PATHS ${_search_paths})
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS FSP_LIBRARY_DIR)
|
||||||
|
list(APPEND _search_paths ${FSP_LIBRARY_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS FSP_PREFIX)
|
||||||
|
list(APPEND _search_paths ${FSP_PREFIX}/lib)
|
||||||
|
endif()
|
||||||
|
find_library(
|
||||||
|
FSP_LIBRARIES
|
||||||
|
NAMES fsp
|
||||||
|
PATHS ${_search_paths})
|
||||||
|
unset(_search_paths)
|
||||||
|
|
||||||
|
if(FSP_INCLUDE_DIRS AND FSP_LIBRARIES)
|
||||||
|
set(FSP_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(FSP_FOUND)
|
||||||
|
if(NOT FSP_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found libfsp")
|
||||||
|
endif()
|
||||||
|
set(HAVE_FSP 1)
|
||||||
|
elseif(FSP_FOUND)
|
||||||
|
if(FSP_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find libfsp")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
42
FindFspThirdparty.cmake
Normal file
42
FindFspThirdparty.cmake
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Подключение внешних проектов
|
||||||
|
include(ExternalProject)
|
||||||
|
|
||||||
|
# cmake-format: off
|
||||||
|
list(APPEND _ext_project_args
|
||||||
|
libfsp
|
||||||
|
DEPENDS libpreprocmath libionobase myxlib
|
||||||
|
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libfsp
|
||||||
|
INSTALL_DIR ${CMAKE_BINARY_DIR}
|
||||||
|
DOWNLOAD_COMMAND ""
|
||||||
|
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
|
||||||
|
-DPREPROCMATH_PREFIX=${CMAKE_BINARY_DIR}
|
||||||
|
-DIONOBASE_PREFIX=${CMAKE_BINARY_DIR}
|
||||||
|
-DMYXLIB_PREFIX=${CMAKE_BINARY_DIR}
|
||||||
|
-DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR}
|
||||||
|
${CMLIB_EXT_PROJ_DEFAULT_ARGS} <SOURCE_DIR>)
|
||||||
|
if(FspThirdparty_FIND_COMPONENTS STREQUAL "headers")
|
||||||
|
list(APPEND _ext_project_args
|
||||||
|
BUILD_COMMAND true
|
||||||
|
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} fsp-install-headers)
|
||||||
|
endif()
|
||||||
|
ExternalProject_Add(${_ext_project_args})
|
||||||
|
unset(_ext_project_args)
|
||||||
|
|
||||||
|
set(FSP_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
||||||
|
# cmake-format: on
|
||||||
|
|
||||||
|
set(FSP_PREFIX
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
CACHE FILEPATH "" FORCE)
|
||||||
|
set(FSP_INCLUDE_DIR
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(FSP_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(FSP_LIBRARY_DIR
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(FSP_LIBRARIES
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libfsp.a
|
||||||
|
CACHE FILEPATH "" FORCE)
|
@ -1,28 +1,44 @@
|
|||||||
if(NOT LIBIONOBASE_IS_EXTERNAL_PROJECT)
|
if(NOT IONOBASE_IS_EXTERNAL_PROJECT)
|
||||||
set(LIBIONOBASE_PREFIX "" CACHE PATH "The path to the prefix of an libionobase installation")
|
set(IONOBASE_PREFIX "" CACHE PATH "The path to the prefix of an libionobase installation")
|
||||||
|
set(IONOBASE_INCLUDE_DIR "" CACHE PATH "The path to the headers of an libionobase installation")
|
||||||
|
set(IONOBASE_LIBRARY_DIR "" CACHE PATH "The path to the library of an libionobase installation")
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS IONOBASE_INCLUDE_DIR)
|
||||||
|
list(APPEND _search_paths ${IONOBASE_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS IONOBASE_PREFIX)
|
||||||
|
list(APPEND _search_paths ${IONOBASE_PREFIX}/include)
|
||||||
|
endif()
|
||||||
find_path(
|
find_path(
|
||||||
LIBIONOBASE_INCLUDE_DIRS
|
IONOBASE_INCLUDE_DIRS
|
||||||
NAMES ionobase/interchfor.hpp
|
NAMES ionobase/interchfor.hpp
|
||||||
PATHS ${LIBIONOBASE_PREFIX}/include)
|
PATHS ${_search_paths})
|
||||||
find_library(
|
|
||||||
LIBIONOBASE_LIBRARY
|
|
||||||
NAMES ionobase
|
|
||||||
PATHS ${LIBIONOBASE_PREFIX}/lib)
|
|
||||||
|
|
||||||
if(LIBIONOBASE_INCLUDE_DIRS AND LIBIONOBASE_LIBRARY)
|
set(_search_paths "")
|
||||||
get_filename_component(LIBIONOBASE_LIBRARY_DIR ${LIBIONOBASE_LIBRARY}
|
if(EXISTS IONOBASE_LIBRARY_DIR)
|
||||||
DIRECTORY CACHE)
|
list(APPEND _search_paths ${IONOBASE_LIBRARY_DIR})
|
||||||
set(LIBIONOBASE_FOUND TRUE)
|
endif()
|
||||||
|
if(EXISTS IONOBASE_PREFIX)
|
||||||
|
list(APPEND _search_paths ${IONOBASE_PREFIX}/lib)
|
||||||
|
endif()
|
||||||
|
find_library(
|
||||||
|
IONOBASE_LIBRARIES
|
||||||
|
NAMES ionobase
|
||||||
|
PATHS ${_search_paths})
|
||||||
|
unset(_search_paths)
|
||||||
|
|
||||||
|
if(IONOBASE_INCLUDE_DIRS AND IONOBASE_LIBRARIES)
|
||||||
|
set(IONOBASE_FOUND TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LIBIONOBASE_FOUND)
|
if(IONOBASE_FOUND)
|
||||||
if(NOT LIBIONOBASE_FIND_QUIETLY)
|
if(NOT IONOBASE_FIND_QUIETLY)
|
||||||
message(STATUS "Found libionobase")
|
message(STATUS "Found libionobase")
|
||||||
endif()
|
endif()
|
||||||
set(HAVE_LIBIONOBASE 1)
|
set(HAVE_IONOBASE 1)
|
||||||
elseif(LIBIONOBASE_FOUND)
|
elseif(IONOBASE_FOUND)
|
||||||
if(LIBIONOBASE_FIND_REQUIRED)
|
if(IONOBASE_FIND_REQUIRED)
|
||||||
message(FATAL_ERROR "Could not find libionobase")
|
message(FATAL_ERROR "Could not find libionobase")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -20,18 +20,21 @@ endif()
|
|||||||
ExternalProject_Add(${_ext_project_args})
|
ExternalProject_Add(${_ext_project_args})
|
||||||
unset(_ext_project_args)
|
unset(_ext_project_args)
|
||||||
|
|
||||||
set(LIBIONOBASE_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
set(IONOBASE_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
||||||
# cmake-format: on
|
# cmake-format: on
|
||||||
|
|
||||||
set(LIBIONOBASE_PREFIX
|
set(IONOBASE_PREFIX
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
set(LIBIONOBASE_INCLUDE_DIRS
|
set(IONOBASE_INCLUDE_DIR
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
set(LIBIONOBASE_LIBRARY_DIR
|
set(IONOBASE_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(IONOBASE_LIBRARY_DIR
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
set(LIBIONOBASE_LIBRARY
|
set(IONOBASE_LIBRARIES
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libionobase.a
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libionobase.a
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
|
@ -1,26 +1,39 @@
|
|||||||
if(NOT MYXLIB_IS_EXTERNAL_PROJECT)
|
if(NOT MYXLIB_IS_EXTERNAL_PROJECT)
|
||||||
set(MYXLIB_PREFIX
|
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")
|
||||||
CACHE PATH "The path to the prefix of an myxlib installation")
|
set(MYXLIB_LIBRARY_DIR "" CACHE PATH "The path to the library of an myxlib installation")
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS MYXLIB_INCLUDE_DIR)
|
||||||
|
list(APPEND _search_paths ${MYXLIB_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS MYXLIB_PREFIX)
|
||||||
|
list(APPEND _search_paths ${MYXLIB_PREFIX}/include)
|
||||||
|
endif()
|
||||||
find_path(
|
find_path(
|
||||||
MYXLIB_INCLUDE_DIRS
|
MYXLIB_INCLUDE_DIRS
|
||||||
NAMES myx/core/config.hpp
|
NAMES myx/core/config.hpp
|
||||||
PATHS ${MYXLIB_PREFIX}/include)
|
PATHS ${_search_paths})
|
||||||
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
|
set(_search_paths "")
|
||||||
AND MYXLIB_QT_LIBRARY
|
if(EXISTS MYXLIB_LIBRARY_DIR)
|
||||||
AND MYXLIB_FILESYSTEM_LIBRARY)
|
list(APPEND _search_paths ${MYXLIB_LIBRARY_DIR})
|
||||||
get_filename_component(MYXLIB_LIBRARY_DIR ${MYXLIB_QT_LIBRARY} DIRECTORY
|
endif()
|
||||||
CACHE)
|
if(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)
|
set(MYXLIB_FOUND TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -26,15 +26,22 @@ set(MYXLIB_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
|||||||
set(MYXLIB_PREFIX
|
set(MYXLIB_PREFIX
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
|
set(MYXLIB_INCLUDE_DIR
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
set(MYXLIB_INCLUDE_DIRS
|
set(MYXLIB_INCLUDE_DIRS
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
set(MYXLIB_LIBRARY_DIR
|
set(MYXLIB_LIBRARY_DIR
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
set(MYXLIB_QT_LIBRARY
|
set(MYXLIB_QT_LIBRARIES
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-qt.a
|
||||||
CACHE FILEPATH "" FORCE)
|
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
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmyx-filesystem.a
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
|
@ -1,28 +1,44 @@
|
|||||||
if(NOT LIBPREPROC_IS_EXTERNAL_PROJECT)
|
if(NOT PREPROC_IS_EXTERNAL_PROJECT)
|
||||||
set(LIBPREPROC_PREFIX "" CACHE PATH "The path to the prefix of an libpreproc installation")
|
set(PREPROC_PREFIX "" CACHE PATH "The path to the prefix of an libpreproc installation")
|
||||||
|
set(PREPROC_INCLUDE_DIR "" CACHE PATH "The path to the headers of an libpreproc installation")
|
||||||
|
set(PREPROC_LIBRARY_DIR "" CACHE PATH "The path to the library of an libpreproc installation")
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS PREPROC_INCLUDE_DIR)
|
||||||
|
list(APPEND _search_paths ${PREPROC_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS PREPROC_PREFIX)
|
||||||
|
list(APPEND _search_paths ${PREPROC_PREFIX}/include)
|
||||||
|
endif()
|
||||||
find_path(
|
find_path(
|
||||||
LIBPREPROC_INCLUDE_DIRS
|
PREPROC_INCLUDE_DIRS
|
||||||
NAMES preproc/mark.hpp
|
NAMES preproc/mark.hpp
|
||||||
PATHS ${LIBPREPROC_PREFIX}/include)
|
PATHS ${_search_paths})
|
||||||
find_library(
|
|
||||||
LIBPREPROC_LIBRARY
|
|
||||||
NAMES preproc
|
|
||||||
PATHS ${LIBPREPROC_PREFIX}/lib)
|
|
||||||
|
|
||||||
if(LIBPREPROC_INCLUDE_DIRS AND LIBPREPROC_LIBRARY)
|
set(_search_paths "")
|
||||||
get_filename_component(LIBPREPROC_LIBRARY_DIR ${LIBPREPROC_LIBRARY}
|
if(EXISTS PREPROC_LIBRARY_DIR)
|
||||||
DIRECTORY CACHE)
|
list(APPEND _search_paths ${PREPROC_LIBRARY_DIR})
|
||||||
set(LIBPREPROC_FOUND TRUE)
|
endif()
|
||||||
|
if(EXISTS PREPROC_PREFIX)
|
||||||
|
list(APPEND _search_paths ${PREPROC_PREFIX}/lib)
|
||||||
|
endif()
|
||||||
|
find_library(
|
||||||
|
PREPROC_LIBRARIES
|
||||||
|
NAMES fsp
|
||||||
|
PATHS ${_search_paths})
|
||||||
|
unset(_search_paths)
|
||||||
|
|
||||||
|
if(PREPROC_INCLUDE_DIRS AND PREPROC_LIBRARIES)
|
||||||
|
set(PREPROC_FOUND TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LIBPREPROC_FOUND)
|
if(PREPROC_FOUND)
|
||||||
if(NOT LIBPREPROC_FIND_QUIETLY)
|
if(NOT PREPROC_FIND_QUIETLY)
|
||||||
message(STATUS "Found libpreproc")
|
message(STATUS "Found libpreproc")
|
||||||
endif()
|
endif()
|
||||||
set(HAVE_LIBPREPROC 1)
|
set(HAVE_PREPROC 1)
|
||||||
elseif(LIBPREPROC_FOUND)
|
elseif(PREPROC_FOUND)
|
||||||
if(LIBPREPROC_FIND_REQUIRED)
|
if(PREPROC_FIND_REQUIRED)
|
||||||
message(FATAL_ERROR "Could not find libpreproc")
|
message(FATAL_ERROR "Could not find libpreproc")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -9,7 +9,7 @@ list(APPEND _ext_project_args
|
|||||||
INSTALL_DIR ${CMAKE_BINARY_DIR}
|
INSTALL_DIR ${CMAKE_BINARY_DIR}
|
||||||
DOWNLOAD_COMMAND ""
|
DOWNLOAD_COMMAND ""
|
||||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
|
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
|
||||||
-DLIBPREPROCMATH_PREFIX=${CMAKE_BINARY_DIR}
|
-DPREPROCMATH_PREFIX=${CMAKE_BINARY_DIR}
|
||||||
-DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR}
|
-DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR}
|
||||||
${CMLIB_EXT_PROJ_DEFAULT_ARGS} <SOURCE_DIR>)
|
${CMLIB_EXT_PROJ_DEFAULT_ARGS} <SOURCE_DIR>)
|
||||||
if(PreprocThirdparty_FIND_COMPONENTS STREQUAL "headers")
|
if(PreprocThirdparty_FIND_COMPONENTS STREQUAL "headers")
|
||||||
@ -20,18 +20,21 @@ endif()
|
|||||||
ExternalProject_Add(${_ext_project_args})
|
ExternalProject_Add(${_ext_project_args})
|
||||||
unset(_ext_project_args)
|
unset(_ext_project_args)
|
||||||
|
|
||||||
set(LIBPREPROC_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
set(PREPROC_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
||||||
# cmake-format: on
|
# cmake-format: on
|
||||||
|
|
||||||
set(LIBPREPROC_PREFIX
|
set(PREPROC_PREFIX
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
set(LIBPREPROC_INCLUDE_DIRS
|
set(PREPROC_INCLUDE_DIR
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
set(LIBPREPROC_LIBRARY_DIR
|
set(PREPROC_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(PREPROC_LIBRARY_DIR
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
set(LIBPREPROC_LIBRARY
|
set(PREPROC_LIBRARIES
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libpreproc.a
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libpreproc.a
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
|
@ -1,28 +1,44 @@
|
|||||||
if(NOT LIBPREPROCMATH_IS_EXTERNAL_PROJECT)
|
if(NOT PREPROCMATH_IS_EXTERNAL_PROJECT)
|
||||||
set(LIBPREPROCMATH_PREFIX "" CACHE PATH "The path to the prefix of an libpreprocmath installation")
|
set(PREPROCMATH_PREFIX "" CACHE PATH "The path to the prefix of an libpreprocmath installation")
|
||||||
|
set(PREPROCMATH_INCLUDE_DIR "" CACHE PATH "The path to the headers of an libpreprocmath installation")
|
||||||
|
set(PREPROCMATH_LIBRARY_DIR "" CACHE PATH "The path to the library of an libpreprocmath installation")
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS PREPROCMATH_INCLUDE_DIR)
|
||||||
|
list(APPEND _search_paths ${PREPROCMATH_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS PREPROCMATH_PREFIX)
|
||||||
|
list(APPEND _search_paths ${PREPROCMATH_PREFIX}/include)
|
||||||
|
endif()
|
||||||
find_path(
|
find_path(
|
||||||
LIBPREPROCMATH_INCLUDE_DIRS
|
PREPROCMATH_INCLUDE_DIRS
|
||||||
NAMES preprocmath/params.hpp
|
NAMES preprocmath/params.hpp
|
||||||
PATHS ${LIBPREPROCMATH_PREFIX}/include)
|
PATHS ${_search_paths})
|
||||||
find_library(
|
|
||||||
LIBPREPROCMATH_LIBRARY
|
|
||||||
NAMES preprocmath
|
|
||||||
PATHS ${LIBPREPROCMATH_PREFIX}/lib)
|
|
||||||
|
|
||||||
if(LIBPREPROCMATH_INCLUDE_DIRS AND LIBPREPROCMATH_LIBRARY)
|
set(_search_paths "")
|
||||||
get_filename_component(LIBPREPROCMATH_LIBRARY_DIR ${LIBPREPROCMATH_LIBRARY}
|
if(EXISTS PREPROCMATH_LIBRARY_DIR)
|
||||||
DIRECTORY CACHE)
|
list(APPEND _search_paths ${PREPROCMATH_LIBRARY_DIR})
|
||||||
set(LIBPREPROCMATH_FOUND TRUE)
|
endif()
|
||||||
|
if(EXISTS PREPROCMATH_PREFIX)
|
||||||
|
list(APPEND _search_paths ${PREPROCMATH_PREFIX}/lib)
|
||||||
|
endif()
|
||||||
|
find_library(
|
||||||
|
PREPROCMATH_LIBRARIES
|
||||||
|
NAMES preprocmath
|
||||||
|
PATHS ${_search_paths})
|
||||||
|
unset(_search_paths)
|
||||||
|
|
||||||
|
if(PREPROCMATH_INCLUDE_DIRS AND PREPROCMATH_LIBRARIES)
|
||||||
|
set(PREPROCMATH_FOUND TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LIBPREPROCMATH_FOUND)
|
if(PREPROCMATH_FOUND)
|
||||||
if(NOT LIBPREPROCMATH_FIND_QUIETLY)
|
if(NOT PREPROCMATH_FIND_QUIETLY)
|
||||||
message(STATUS "Found libpreprocmath")
|
message(STATUS "Found libpreprocmath")
|
||||||
endif()
|
endif()
|
||||||
set(HAVE_LIBPREPROCMATH 1)
|
set(HAVE_PREPROCMATH 1)
|
||||||
elseif(LIBPREPROCMATH_FOUND)
|
elseif(PREPROCMATH_FOUND)
|
||||||
if(LIBPREPROCMATH_FIND_REQUIRED)
|
if(PREPROCMATH_FIND_REQUIRED)
|
||||||
message(FATAL_ERROR "Could not find libpreprocmath")
|
message(FATAL_ERROR "Could not find libpreprocmath")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -18,18 +18,21 @@ endif()
|
|||||||
ExternalProject_Add(${_ext_project_args})
|
ExternalProject_Add(${_ext_project_args})
|
||||||
unset(_ext_project_args)
|
unset(_ext_project_args)
|
||||||
|
|
||||||
set(LIBPREPROCMATH_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
set(PREPROCMATH_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
||||||
# cmake-format: on
|
# cmake-format: on
|
||||||
|
|
||||||
set(LIBPREPROCMATH_PREFIX
|
set(PREPROCMATH_PREFIX
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
set(LIBPREPROCMATH_INCLUDE_DIRS
|
set(PREPROCMATH_INCLUDE_DIR
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
set(LIBPREPROCMATH_LIBRARY_DIR
|
set(PREPROCMATH_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(PREPROCMATH_LIBRARY_DIR
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
set(LIBPREPROCMATH_LIBRARY
|
set(PREPROCMATH_LIBRARIES
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libpreprocmath.a
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libpreprocmath.a
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
|
45
FindSignalView.cmake
Normal file
45
FindSignalView.cmake
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
if(NOT SIGNALVIEW_IS_EXTERNAL_PROJECT)
|
||||||
|
set(SIGNALVIEW_PREFIX "" CACHE PATH "The path to the prefix of an libsignalview installation")
|
||||||
|
set(SIGNALVIEW_INCLUDE_DIR "" CACHE PATH "The path to the headers of an libsignalview installation")
|
||||||
|
set(SIGNALVIEW_LIBRARY_DIR "" CACHE PATH "The path to the library of an libsignalview installation")
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS SIGNALVIEW_INCLUDE_DIR)
|
||||||
|
list(APPEND _search_paths ${SIGNALVIEW_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS SIGNALVIEW_PREFIX)
|
||||||
|
list(APPEND _search_paths ${SIGNALVIEW_PREFIX}/include)
|
||||||
|
endif()
|
||||||
|
find_path(
|
||||||
|
SIGNALVIEW_INCLUDE_DIRS
|
||||||
|
NAMES signalview/wndSignalView.hpp
|
||||||
|
PATHS ${_search_paths})
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS SIGNALVIEW_LIBRARY_DIR)
|
||||||
|
list(APPEND _search_paths ${SIGNALVIEW_LIBRARY_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS SIGNALVIEW_PREFIX)
|
||||||
|
list(APPEND _search_paths ${SIGNALVIEW_PREFIX}/lib)
|
||||||
|
endif()
|
||||||
|
find_library(
|
||||||
|
SIGNALVIEW_LIBRARIES
|
||||||
|
NAMES fsp
|
||||||
|
PATHS ${_search_paths})
|
||||||
|
unset(_search_paths)
|
||||||
|
|
||||||
|
if(SIGNALVIEW_INCLUDE_DIRS AND SIGNALVIEW_LIBRARIES)
|
||||||
|
set(SIGNALVIEW_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(SIGNALVIEW_FOUND)
|
||||||
|
if(NOT SIGNALVIEW_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found libsignalview")
|
||||||
|
endif()
|
||||||
|
set(HAVE_SIGNALVIEW 1)
|
||||||
|
elseif(SIGNALVIEW_FOUND)
|
||||||
|
if(SIGNALVIEW_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find libsignalview")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
40
FindSignalViewThirdparty.cmake
Normal file
40
FindSignalViewThirdparty.cmake
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Подключение внешних проектов
|
||||||
|
include(ExternalProject)
|
||||||
|
|
||||||
|
# cmake-format: off
|
||||||
|
list(APPEND _ext_project_args
|
||||||
|
libsignalview
|
||||||
|
DEPENDS libpreprocmath
|
||||||
|
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libsignalview
|
||||||
|
INSTALL_DIR ${CMAKE_BINARY_DIR}
|
||||||
|
DOWNLOAD_COMMAND ""
|
||||||
|
CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
|
||||||
|
-DPREPROCMATH_PREFIX=${CMAKE_BINARY_DIR}
|
||||||
|
-DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR}
|
||||||
|
${CMLIB_EXT_PROJ_DEFAULT_ARGS} <SOURCE_DIR>)
|
||||||
|
if(SignalViewThirdparty_FIND_COMPONENTS STREQUAL "headers")
|
||||||
|
list(APPEND _ext_project_args
|
||||||
|
BUILD_COMMAND true
|
||||||
|
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} signalview-install-headers)
|
||||||
|
endif()
|
||||||
|
ExternalProject_Add(${_ext_project_args})
|
||||||
|
unset(_ext_project_args)
|
||||||
|
|
||||||
|
set(SIGNALVIEW_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
||||||
|
# cmake-format: on
|
||||||
|
|
||||||
|
set(SIGNALVIEW_PREFIX
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
CACHE FILEPATH "" FORCE)
|
||||||
|
set(SIGNALVIEW_INCLUDE_DIR
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(SIGNALVIEW_INCLUDE_DIRS
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(SIGNALVIEW_LIBRARY_DIR
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
|
set(SIGNALVIEW_LIBRARIES
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libsignalview.a
|
||||||
|
CACHE FILEPATH "" FORCE)
|
@ -1,12 +1,18 @@
|
|||||||
if(NOT VEER_PROTOCOLS_IS_EXTERNAL_PROJECT)
|
if(NOT VEER_PROTOCOLS_IS_EXTERNAL_PROJECT)
|
||||||
set(VEER_PROTOCOLS_PREFIX
|
set(VEER_PROTOCOLS_PREFIX "" CACHE PATH "The path to the prefix of an veer protocols installation")
|
||||||
""
|
set(VEER_PROTOCOLS_INCLUDE_DIR "" CACHE PATH "The path to the headers of an libfsp installation")
|
||||||
CACHE PATH "The path to the prefix of an veer protocols installation")
|
|
||||||
|
|
||||||
|
set(_search_paths "")
|
||||||
|
if(EXISTS VEER_PROTOCOLS_INCLUDE_DIR)
|
||||||
|
list(APPEND _search_paths ${VEER_PROTOCOLS_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
if(EXISTS VEER_PROTOCOLS_PREFIX)
|
||||||
|
list(APPEND _search_paths ${VEER_PROTOCOLS_PREFIX}/include)
|
||||||
|
endif()
|
||||||
find_path(
|
find_path(
|
||||||
VEER_PROTOCOLS_INCLUDE_DIRS
|
VEER_PROTOCOLS_INCLUDE_DIRS
|
||||||
NAMES veer/common/ports.hpp
|
NAMES veer/common/ports.hpp
|
||||||
PATHS ${VEER_PROTOCOLS_PREFIX}/include)
|
PATHS ${_search_paths})
|
||||||
|
|
||||||
if(VEER_PROTOCOLS_INCLUDE_DIRS)
|
if(VEER_PROTOCOLS_INCLUDE_DIRS)
|
||||||
set(VEER_PROTOCOLS_FOUND TRUE)
|
set(VEER_PROTOCOLS_FOUND TRUE)
|
||||||
|
@ -26,6 +26,9 @@ set(VEER_PROTOCOLS_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
|
|||||||
set(VEER_PROTOCOLS_PREFIX
|
set(VEER_PROTOCOLS_PREFIX
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
CACHE FILEPATH "" FORCE)
|
CACHE FILEPATH "" FORCE)
|
||||||
|
set(VEER_PROTOCOLS_INCLUDE_DIR
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
CACHE PATH "" FORCE)
|
||||||
set(VEER_PROTOCOLS_INCLUDE_DIRS
|
set(VEER_PROTOCOLS_INCLUDE_DIRS
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
CACHE PATH "" FORCE)
|
CACHE PATH "" FORCE)
|
||||||
|
Loading…
Reference in New Issue
Block a user