Commit 7967b63c authored by Kirill Terekhov's avatar Kirill Terekhov

CMake installation scripts

Now build directory and install directory of inmost should work equally
well with find_package(inmost)
parent b7edc32f
......@@ -271,4 +271,4 @@ install(TARGETS inmost EXPORT inmost-targets
PUBLIC_HEADER DESTINATION include)
install(EXPORT inmost-targets DESTINATION ".")
install(EXPORT inmost-targets DESTINATION cmake)
......@@ -10,7 +10,13 @@ get_filename_component(inmost_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(INMOST_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
if(NOT TARGET inmost AND NOT INMOST_BINARY_DIR)
include("${inmost_DIR}/inmost-targets.cmake")
if( EXISTS "${inmost_DIR}/cmake/inmost-targets.cmake" )
include("${inmost_DIR}/cmake/inmost-targets.cmake")
elseif( EXISTS "${inmost_DIR}/inmost-targets.cmake" )
include("${inmost_DIR}/inmost-targets.cmake")
elseif( EXISTS "${inmost_DIR}/CMakeFiles/Exports/cmake/inmost-targets.cmake")
include("${inmost_DIR}/CMakeFiles/Export/cmake/inmost-targets.cmake")
endif()
endif()
set(INMOST_LIBRARY_DIRS "${inmost_DIR}/lib")
......@@ -48,6 +54,11 @@ if( USE_SOLVER_TRILINOS )
list(APPEND INMOST_LIBRARY_DIRS "@Trilinos_TPL_LIBRARY_DIRS@")
list(APPEND INMOST_INCLUDE_DIRS "@Trilinos_INCLUDE_DIRS@")
list(APPEND INMOST_INCLUDE_DIRS "@Trilinos_TPL_INCLUDE_DIRS@")
if(MSVC)
message("Putting workaround for Visual Studio that allow to use Trilinos Release libraries in Debug mode")
message("Note that this workaround may affect your debugging experience, you may want to debug without Trilinos")
list(APPEND INMOST_DEFINITIONS "-D_ITERATOR_DEBUG_LEVEL=0")
endif(MSVC)
endif( USE_SOLVER_TRILINOS )
......
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