diff --git a/FindPreprocThirdparty.cmake b/FindPreprocThirdparty.cmake index 821a7b0..f8e3640 100644 --- a/FindPreprocThirdparty.cmake +++ b/FindPreprocThirdparty.cmake @@ -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} 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} ) endif() +set(LIBPREPROC_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE) + set(LIBPREPROC_PREFIX ${CMAKE_BINARY_DIR} CACHE FILEPATH "" FORCE) diff --git a/FindPreprocmathThirdparty.cmake b/FindPreprocmathThirdparty.cmake index 080706c..67c67ce 100644 --- a/FindPreprocmathThirdparty.cmake +++ b/FindPreprocmathThirdparty.cmake @@ -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() ) endif() +set(LIBPREPROCMATH_IS_EXTERNAL_PROJECT ON CACHE BOOL "" FORCE) + set(LIBPREPROCMATH_PREFIX ${CMAKE_BINARY_DIR} CACHE FILEPATH "" FORCE)