Skip to content

Commit

Permalink
Ensure that the correct install prefix is passed to example builds
Browse files Browse the repository at this point in the history
  • Loading branch information
steveire committed Nov 24, 2019
1 parent 3a9db8e commit d8fbaec
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.