Permalink
Browse files

Merge pull request #2243 from junghans/no_libs

cmake: install everything in python sitedir
  • Loading branch information...
KaiSzuttor committed Nov 8, 2018
2 parents 40e9490 + 577ed07 commit f04f4bbbfccf1d2cbac635d46a7e292588732f43
View
@@ -375,19 +375,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")
#######################################################################
@@ -409,6 +401,8 @@ endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-as-needed")
endif()
# drop 'lib' prefix from all libraries
set(CMAKE_SHARED_LIBRARY_PREFIX "")
if(WARNINGS_ARE_ERRORS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
View
@@ -84,13 +84,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})
@@ -130,7 +130,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)
@@ -7,5 +7,5 @@ target_include_directories(H5mdCore SYSTEM PUBLIC
add_dependencies(H5mdCore EspressoConfig)
target_include_directories(H5mdCore PRIVATE ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_BINARY_DIR}/src/core)
install(TARGETS H5mdCore LIBRARY DESTINATION ${LIBDIR})
install(TARGETS H5mdCore LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
endif()
@@ -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)
@@ -13,7 +13,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)
@@ -4,7 +4,7 @@
function helper_test_install_common() {
local root=$1
local filepaths=("${root}/bin/pypresso" \
"${root}/lib/libEspressoCore.so" \
"${root}/@Python_SITEARCH@/espressomd/EspressoCore.so" \
)
if [ "@TESTING_PYTHON@" = "TRUE" ]
then

0 comments on commit f04f4bb

Please sign in to comment.