Правки

This commit is contained in:
Andrei Astafev 2021-06-24 09:21:52 +03:00
parent 28bfad1960
commit 6b9db876fd
2 changed files with 9 additions and 1 deletions

View File

@ -4,11 +4,13 @@ include(ExternalProject)
if(PreprocThirdparty_FIND_COMPONENTS STREQUAL "headers")
ExternalProject_Add(
libpreproc
DEPENDS libpreprocmath
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libpreproc
INSTALL_DIR ${CMAKE_BINARY_DIR}
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND
${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-DLIBPREPROCMATH_PREFIX=${CMAKE_BINARY_DIR}
-DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR} ${CMLIB_EXT_PROJ_DEFAULT_ARGS}
<SOURCE_DIR>
BUILD_COMMAND true
@ -16,15 +18,19 @@ if(PreprocThirdparty_FIND_COMPONENTS STREQUAL "headers")
else()
ExternalProject_Add(
libpreproc
DEPENDS libpreprocmath
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libpreproc
INSTALL_DIR ${CMAKE_BINARY_DIR}
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND
${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-DLIBPREPROCMATH_PREFIX=${CMAKE_BINARY_DIR}
-DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR} ${CMLIB_EXT_PROJ_DEFAULT_ARGS}
<SOURCE_DIR>)
endif()
set(LIBPREPROC_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
set(LIBPREPROC_PREFIX
${CMAKE_BINARY_DIR}
CACHE FILEPATH "" FORCE)

View File

@ -1,7 +1,7 @@
# Подключение внешних проектов
include(ExternalProject)
if(${PreprocmathThirdparty_FIND_COMPONENTS} STREQUAL "headers")
if(PreprocmathThirdparty_FIND_COMPONENTS STREQUAL "headers")
ExternalProject_Add(
libpreprocmath
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/libpreprocmath
@ -25,6 +25,8 @@ else()
<SOURCE_DIR>)
endif()
set(LIBPREPROCMATH_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE)
set(LIBPREPROCMATH_PREFIX
${CMAKE_BINARY_DIR}
CACHE FILEPATH "" FORCE)