Commit 0eafe444 authored by Berenger Bramas's avatar Berenger Bramas

Update cmake -- nothing to install by default

parent 99beb05a
......@@ -50,8 +50,14 @@ if(NOT DEFINED INASTEMP_JUST_LIB)
"Set to on to build the lib for external use (without test and extra flags)" FORCE)
endif()
if(NOT DEFINED INASTEMP_DO_INSTALL)
set(INASTEMP_DO_INSTALL OFF CACHE BOOL
"Set to on to install the headers file of inastemp" FORCE)
endif()
if($ENV{VERBOSE})
MESSAGE(STATUS "Main -- INASTEMP_JUST_LIB ${INASTEMP_JUST_LIB}")
MESSAGE(STATUS "Main -- INASTEMP_DO_INSTALL ${INASTEMP_DO_INSTALL}")
endif()
#===========================================================================
......@@ -192,7 +198,9 @@ configure_file(${INASTEMP_SOURCE_DIR}/CMakeModules/InastempInfo.cmake.in
${INASTEMP_BINARY_DIR}/InastempInfo.cmake
@ONLY IMMEDIATE
)
install(FILES ${INASTEMP_BINARY_DIR}/InastempInfo.cmake DESTINATION lib/ )
if(INASTEMP_DO_INSTALL)
install(FILES ${INASTEMP_BINARY_DIR}/InastempInfo.cmake DESTINATION lib/ )
endif()
if(INASTEMP_AS_SUBPROJECT)
set(INASTEMP_CXX_FLAGS "${INASTEMP_CXX_FLAGS}" PARENT_SCOPE)
......
......@@ -19,12 +19,16 @@ file(
)
FOREACH(hpp_file ${hpp_in_dir})
file(RELATIVE_PATH relative_hpp_file ${CMAKE_CURRENT_SOURCE_DIR} ${hpp_file})
INSTALL( FILES ${hpp_file} DESTINATION include/${relative_hpp_file} )
if(INASTEMP_DO_INSTALL)
INSTALL( FILES ${hpp_file} DESTINATION include/${relative_hpp_file} )
endif()
if($ENV{VERBOSE})
MESSAGE(STATUS "Src -- Add ${relative_hpp_file}")
endif()
ENDFOREACH()
INSTALL( FILES "${INASTEMP_BINARY_DIR}/Src/InastempConfig.h" DESTINATION include/Src )
if(INASTEMP_DO_INSTALL)
INSTALL( FILES "${INASTEMP_BINARY_DIR}/Src/InastempConfig.h" DESTINATION include/Src )
endif()
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