Commit 5a42bff3 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema

More cmake fixes to support building as a submodule

parent 80d47a12
......@@ -84,26 +84,28 @@ endif()
# write config file
configure_file(
"${PROJECT_SOURCE_DIR}/cmake/config/idg-examples-config.h.in"
"${PROJECT_BINARY_DIR}/idg-examples-config.h"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/idg-examples-config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/idg-examples-config.h"
)
# add directory of config file to include directories
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# write file to initialize environment
configure_file (
"${PROJECT_SOURCE_DIR}/cmake/config/init-environment.sh.in"
"${PROJECT_BINARY_DIR}/init-environment.sh"
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/init-environment.sh.in"
"${CMAKE_CURRENT_BINARY_DIR}/init-environment.sh"
)
install(
FILES
"${PROJECT_BINARY_DIR}/init-environment.sh"
"${CMAKE_CURRENT_BINARY_DIR}/init-environment.sh"
DESTINATION
${CMAKE_INSTALL_PREFIX}
)
set (IDG_BIN_UTILITY_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/utility)
# build utilities
add_subdirectory(utility)
......
project(cxx)
# set utility include directory
include_directories(${CMAKE_SOURCE_DIR}/utility)
include_directories(${IDG_BIN_UTILITY_INCLUDE_DIR})
# set common include directory
include_directories(common)
......
project(cxx)
# set utility include directory
include_directories(${CMAKE_SOURCE_DIR}/utility)
include_directories(${IDG_BIN_UTILITY_INCLUDE_DIR})
# set common include directory
include_directories(common)
......
......@@ -2,7 +2,7 @@ project(utility-initialize)
# external header files needed
include_directories (
${CMAKE_SOURCE_DIR}/utility/external
${IDG_BIN_UTILITY_INCLUDE_DIR}/external
)
# sources and header files
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment