Commit 23d7f113 authored by Gregor Olenik's avatar Gregor Olenik
Browse files

install libginkgo.so files along with libOGL.so if no external ginkgo is used

parent d06461f6
...@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.9) ...@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.9)
project(OGL LANGUAGES C CXX DESCRIPTION "A wrapper for Ginkgo solver to provide GPGPU capabilities to OpenFOAM") project(OGL LANGUAGES C CXX DESCRIPTION "A wrapper for Ginkgo solver to provide GPGPU capabilities to OpenFOAM")
if(NOT DEFINED ENV{FOAM_SRC})
message(FATAL_ERROR "You must source OpenFOAM before building OGL")
endif()
# Configuration options # Configuration options
include(cmake/build_type_helpers.cmake) include(cmake/build_type_helpers.cmake)
...@@ -107,6 +111,7 @@ LduMatrix/GKOLduBase/GKOLduBase.H ...@@ -107,6 +111,7 @@ LduMatrix/GKOLduBase/GKOLduBase.H
LduMatrix/GKOACG/GKOACG.H LduMatrix/GKOACG/GKOACG.H
) )
target_include_directories(OGL target_include_directories(OGL
PUBLIC PUBLIC
$ENV{FOAM_SRC}/OpenFOAM/lnInclude $ENV{FOAM_SRC}/OpenFOAM/lnInclude
...@@ -118,13 +123,20 @@ target_include_directories(OGL ...@@ -118,13 +123,20 @@ target_include_directories(OGL
LduMatrix/GKOLduBase LduMatrix/GKOLduBase
) )
string(CONCAT $foam_path "/" $ENV{USER} "-" ${OGL_OF_VERSION} "/platforms/")
install(TARGETS OGL
LIBRARY DESTINATION $ENV{FOAM_USER_LIBBIN}
)
target_link_libraries(OGL target_link_libraries(OGL
PUBLIC PUBLIC
Ginkgo::ginkgo Ginkgo::ginkgo
) )
install(TARGETS OGL
DESTINATION $ENV{FOAM_USER_LIBBIN}
)
if(NOT ${OGL_USE_EXTERNAL_GINKGO})
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/third_party/ginkgo/build/install/lib/
DESTINATION $ENV{FOAM_USER_LIBBIN}
)
endif()
Supports Markdown
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