Skip to content
Permalink
Browse files

Ensure that the correct install prefix is passed to example builds

  • Loading branch information
steveire committed Nov 24, 2019
1 parent 3a9db8e commit d8fbaec07a69a752441f2345a18388adf2e11bb8
Showing with 16 additions and 0 deletions.
  1. +16 −0 examples/CMakeLists.txt
@@ -4,30 +4,46 @@ project(grantlee_examples)

include(ExternalProject)

if (IS_ABSOLUTE ${CMAKE_PREFIX_PATH})
set(prefixPath ${CMAKE_PREFIX_PATH})
else()
set(prefixPath ${CMAKE_BINARY_DIR}/${CMAKE_PREFIX_PATH})
endif()

ExternalProject_Add(books
SOURCE_DIR ${CMAKE_SOURCE_DIR}/books
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
)
ExternalProject_Add(codegen
SOURCE_DIR ${CMAKE_SOURCE_DIR}/codegen
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
DEPENDS books
)

ExternalProject_Add(contacts
SOURCE_DIR ${CMAKE_SOURCE_DIR}/contacts
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
DEPENDS codegen
)

ExternalProject_Add(htmlapps
SOURCE_DIR ${CMAKE_SOURCE_DIR}/htmlapps
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
DEPENDS contacts
)

ExternalProject_Add(textedit
SOURCE_DIR ${CMAKE_SOURCE_DIR}/textedit
INSTALL_COMMAND ""
CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${prefixPath}
DEPENDS htmlapps
)

0 comments on commit d8fbaec

Please sign in to comment.
You can’t perform that action at this time.