Browse Source

Only add antkeeper-data external project if directory exists

master
C. J. Howard 4 years ago
parent
commit
2644f8ffc5
2 changed files with 17 additions and 15 deletions
  1. +16
    -14
      CMakeLists.txt
  2. +1
    -1
      modules/antkeeper-source

+ 16
- 14
CMakeLists.txt View File

@ -222,20 +222,22 @@ ExternalProject_Add(antkeeper-source
"-DCMAKE_CXX_FLAGS_RELEASE='${CMAKE_CXX_FLAGS_RELEASE}'"
BUILD_ALWAYS 1)
# Build antkeeper-data module
ExternalProject_Add(antkeeper-data
DEPENDS antkeeper-source
SOURCE_DIR ${MODULE_SOURCE_DIR}/antkeeper-data
BINARY_DIR ${MODULE_BUILD_DIR}/antkeeper-data
INSTALL_DIR ${PACKAGE_INSTALL_DIR}
CMAKE_ARGS
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DCMAKE_INSTALL_PREFIX=${PACKAGE_INSTALL_DIR}"
"-DPACKAGE_PLATFORM=${PACKAGE_PLATFORM}"
"-DCMAKE_PREFIX_PATH=${MODULE_INSTALL_DIR}"
"-DBLENDER=${BLENDER}"
"-DINKSCAPE=${INKSCAPE}"
BUILD_ALWAYS 1)
# Build antkeeper-data module (if exists)
if(IS_DIRECTORY ${MODULE_SOURCE_DIR}/antkeeper-data)
ExternalProject_Add(antkeeper-data
DEPENDS antkeeper-source
SOURCE_DIR ${MODULE_SOURCE_DIR}/antkeeper-data
BINARY_DIR ${MODULE_BUILD_DIR}/antkeeper-data
INSTALL_DIR ${PACKAGE_INSTALL_DIR}
CMAKE_ARGS
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DCMAKE_INSTALL_PREFIX=${PACKAGE_INSTALL_DIR}"
"-DPACKAGE_PLATFORM=${PACKAGE_PLATFORM}"
"-DCMAKE_PREFIX_PATH=${MODULE_INSTALL_DIR}"
"-DBLENDER=${BLENDER}"
"-DINKSCAPE=${INKSCAPE}"
BUILD_ALWAYS 1)
endif()
# Create install target
install(DIRECTORY "${PACKAGE_INSTALL_DIR}/" DESTINATION . COMPONENT "package" USE_SOURCE_PERMISSIONS FILES_MATCHING PATTERN "*")

+ 1
- 1
modules/antkeeper-source

@ -1 +1 @@
Subproject commit 8a13e2c18e609a4a3a638ad6fe75399de25db599
Subproject commit eda82650c9978cb75ae344c404a3abeb76bef5d1

Loading…
Cancel
Save