Skip to content
Snippets Groups Projects
Commit d3c8a406 authored by Markus Blatt's avatar Markus Blatt
Browse files

Install libs correctly.

Produce and install a preliminary  package configuration file.

[[Imported from SVN: r6641]]
parent 7813d42f
Branches
Tags
No related merge requests found
......@@ -23,8 +23,14 @@ set(DUNE_COMMON_VERSION_MINOR "${DUNE_VERSION_MINOR}")
set(DUNE_COMMON_VERSION_REVISION "${DUNE_VERSION_REVISION}")
option("DUNE_USE_ONLY_STATIC_LIBS" "If set to ON, we will force static linkage everywhere")
message("DUNE_USE_ONLY_STATIC_LIBS ${DUNE_USE_ONLY_STATIC_LIBS}")
option(DUNE_USE_ONLY_STATIC_LIBS "If set to ON, we will force static linkage everywhere" OFF)
if(DUNE_USE_ONLY_STATIC_LIBS)
set(_default_enable_shared OFF)
else(DUNE_USE_ONLY_STATIC_LIBS)
set(_default_enable_shared ON)
endif(DUNE_USE_ONLY_STATIC_LIBS)
option(BUILD_SHARED_LIBS "If set to ON, shared libs will be built" ${_default_enable_shared})
if(DUNE_USE_ONLY_STATIC_LIBS)
# Use only static libraries.
# We do this by overriding the library suffixes.
......
......@@ -10,8 +10,14 @@ add_library("dunecommon"
parametertreeparser.cc
path.cc
stdstreams.cc)
install(TARGETS dunecommon EXPORT dune-common-targets DESTINATION lib)
install(EXPORT dune-common-targets
DESTINATION lib/cmake)
# build the library in lib
set_target_properties(dunecommon PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set_target_properties(dunecommon PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set_target_properties(dunecommon PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
#install headers
install(FILES
......
if (DUNE_USE_ONLY_STATIC_LIBS)
install(TARGETS dunecommon ARCHIVE DESTINATION lib)
else(DUNE_USE_ONLY_STATIC_LIBS)
install(TARGETS dunecommon LIBRARY DESTINATION lib)
endif(DUNE_USE_ONLY_STATIC_LIB)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment