Commit b96530de authored by Christoph Junghans's avatar Christoph Junghans

cmake: install everything in python sitedir

Without tcl is makes not much sense to install libraries in libdir
anymore.
parent 7db1d715
Pipeline #3396 passed with stages
in 47 minutes and 13 seconds
......@@ -329,19 +329,11 @@ endif()
# Paths
#######################################################################
if (NOT DEFINED DATA)
set(DATA "share/espresso")
endif(NOT DEFINED DATA)
if (NOT DEFINED LIBDIR)
set(LIBDIR "lib")
endif(NOT DEFINED LIBDIR)
if (NOT DEFINED BINDIR)
set(BINDIR "bin")
endif(NOT DEFINED BINDIR)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTDIR}/espressomd")
#######################################################################
......
......@@ -86,13 +86,13 @@ add_custom_command(
add_library(EspressoConfig SHARED config-features.cpp)
add_dependencies(EspressoConfig myconfig check_myconfig generate_config_features)
install(TARGETS EspressoConfig LIBRARY DESTINATION ${LIBDIR})
install(TARGETS EspressoConfig LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(EspressoConfig PROPERTIES SOVERSION ${SOVERSION})
target_include_directories(EspressoConfig PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
add_library(EspressoCore SHARED ${EspressoCore_SRC} config-version.cpp)
add_dependencies(EspressoCore EspressoConfig)
install(TARGETS EspressoCore LIBRARY DESTINATION ${LIBDIR})
install(TARGETS EspressoCore LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(EspressoCore PROPERTIES SOVERSION ${SOVERSION})
target_include_directories(EspressoCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(EspressoCore PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
......@@ -132,7 +132,7 @@ if(CUDA)
cuda_include_directories(${CMAKE_CURRENT_BINARY_DIR})
cuda_add_library(EspressoCuda SHARED ${EspressoCuda_SRC})
install(TARGETS EspressoCuda DESTINATION ${LIBDIR})
install(TARGETS EspressoCuda DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(EspressoCuda PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(EspressoCuda EspressoConfig)
......
......@@ -5,7 +5,7 @@ set(Accumulators_SRC
MeanVarianceCalculator.cpp
)
add_library(Accumulators SHARED ${Accumulators_SRC})
install(TARGETS Accumulators LIBRARY DESTINATION ${LIBDIR})
install(TARGETS Accumulators LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(Accumulators PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(Accumulators EspressoConfig)
set_target_properties(Accumulators PROPERTIES MACOSX_RPATH TRUE)
......
......@@ -8,7 +8,7 @@ set(Actor_SRC
)
add_library(Actor SHARED ${Actor_SRC})
install(TARGETS Actor LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
install(TARGETS Actor LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd ARCHIVE DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(Actor PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(Actor EspressoConfig)
target_include_directories(Actor PRIVATE ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_BINARY_DIR}/src/core)
......@@ -22,7 +22,7 @@ if(CUDA)
Mmm1dgpuForce_cuda.cu
)
cuda_add_library(ActorCuda SHARED ${ActorCuda_SRC})
install(TARGETS ActorCuda DESTINATION ${LIBDIR})
install(TARGETS ActorCuda DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(ActorCuda PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(ActorCuda EspressoConfig)
......
......@@ -3,7 +3,7 @@ set(cluster_analysis_SRC
ClusterStructure.cpp
)
add_library(cluster_analysis SHARED ${cluster_analysis_SRC})
install(TARGETS cluster_analysis LIBRARY DESTINATION ${LIBDIR})
install(TARGETS cluster_analysis LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(cluster_analysis PROPERTIES SOVERSION ${SOVERSION})
set_target_properties(cluster_analysis PROPERTIES MACOSX_RPATH TRUE)
add_dependencies(cluster_analysis EspressoConfig)
......
......@@ -3,7 +3,7 @@ set(Constraints_SRC
ShapeBasedConstraint.cpp
)
add_library(Constraints SHARED ${Constraints_SRC})
install(TARGETS Constraints LIBRARY DESTINATION ${LIBDIR})
install(TARGETS Constraints LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(Constraints PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(Constraints EspressoConfig)
target_include_directories(Constraints PRIVATE ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_BINARY_DIR}/src/core)
......@@ -25,7 +25,7 @@ if(CUDA)
cuda_include_directories(${CMAKE_CURRENT_BINARY_DIR})
cuda_add_library(electrostatics_magnetostatics_core_cuda SHARED ${electrostatics_core_cuda_src})
install(TARGETS electrostatics_magnetostatics_core_cuda DESTINATION ${LIBDIR})
install(TARGETS electrostatics_magnetostatics_core_cuda DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(electrostatics_magnetostatics_core_cuda PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(electrostatics_magnetostatics_core_cuda EspressoConfig)
......
......@@ -4,7 +4,7 @@ set(ImmersedBoundary_SRC
ImmersedBoundaries.cpp
)
add_library(ImmersedBoundary SHARED ${ImmersedBoundary_SRC})
install(TARGETS ImmersedBoundary LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
install(TARGETS ImmersedBoundary LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd ARCHIVE DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(ImmersedBoundary PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(ImmersedBoundary EspressoConfig)
set_target_properties(ImmersedBoundary PROPERTIES LINKER_LANGUAGE CXX)
......
......@@ -6,7 +6,7 @@ set(ObjectInFluid_SRC
out_direction.cpp
)
add_library(ObjectInFluid SHARED ${ObjectInFluid_SRC})
install(TARGETS ObjectInFluid LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
install(TARGETS ObjectInFluid LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd ARCHIVE DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(ObjectInFluid PROPERTIES SOVERSION ${SOVERSION})
target_include_directories(ObjectInFluid PRIVATE ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_BINARY_DIR}/src/core)
add_dependencies(ObjectInFluid EspressoConfig)
......
......@@ -5,7 +5,7 @@ set(Observables_SRC
LBVelocityProfile.cpp
)
add_library(Observables SHARED ${Observables_SRC})
install(TARGETS Observables LIBRARY DESTINATION ${LIBDIR})
install(TARGETS Observables LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(Observables PROPERTIES SOVERSION ${SOVERSION})
target_include_directories(Observables PRIVATE ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_BINARY_DIR}/src/core)
add_dependencies(Observables EspressoConfig)
......@@ -12,7 +12,7 @@ set(Shapes_SRC
Wall.cpp
)
add_library(Shapes SHARED ${Shapes_SRC})
install(TARGETS Shapes LIBRARY DESTINATION ${LIBDIR})
install(TARGETS Shapes LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(Shapes PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(Shapes EspressoConfig)
target_include_directories(Shapes PRIVATE ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_BINARY_DIR}/src/core)
......@@ -6,7 +6,7 @@ set(VirtualSites_SRC
VirtualSitesRelative.cpp
)
add_library(VirtualSites SHARED ${VirtualSites_SRC})
install(TARGETS VirtualSites LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
install(TARGETS VirtualSites LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd ARCHIVE DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(VirtualSites PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(VirtualSites EspressoConfig)
......@@ -15,7 +15,7 @@ if(CUDA)
lb_inertialess_tracers_cuda.cu
)
cuda_add_library(VirtualSitesCuda SHARED ${VirtualSitesCuda_SRC})
install(TARGETS VirtualSitesCuda DESTINATION ${LIBDIR})
install(TARGETS VirtualSitesCuda DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(VirtualSitesCuda PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(VirtualSitesCuda EspressoConfig)
......
......@@ -34,7 +34,7 @@ if( WITH_COVERAGE )
endif()
add_library(EspressoScriptInterface SHARED ${EspressoScriptInterface_SRC})
install(TARGETS EspressoScriptInterface LIBRARY DESTINATION ${LIBDIR})
install(TARGETS EspressoScriptInterface LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(EspressoScriptInterface PROPERTIES SOVERSION ${SOVERSION})
add_dependencies(EspressoScriptInterface EspressoConfig)
target_link_libraries(EspressoScriptInterface EspressoCore)
......
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