forked from lijiext/lammps
SOVERSION not needed for STATIC libs
This commit is contained in:
parent
19b77857dc
commit
098861375b
|
@ -62,7 +62,6 @@ if(ENABLE_MPI)
|
|||
else()
|
||||
file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.c)
|
||||
add_library(mpi_stubs STATIC ${MPI_SOURCES})
|
||||
set_target_properties(mpi_stubs PROPERTIES SOVERSION ${SOVERSION})
|
||||
include_directories(${LAMMPS_SOURCE_DIR}/STUBS)
|
||||
list(APPEND LAMMPS_LINK_LIBS mpi_stubs)
|
||||
endif()
|
||||
|
@ -175,7 +174,6 @@ if(ENABLE_MSCG OR ENABLE_USER-ATC OR ENABLE_USER-AWPMD OR ENABLE_USER-QUIP)
|
|||
enable_language(Fortran)
|
||||
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.f)
|
||||
add_library(linalg STATIC ${LAPACK_SOURCES})
|
||||
set_target_properties(${PKG_LIB} PROPERTIES SOVERSION ${SOVERSION})
|
||||
include(CheckFortranCompilerFlag)
|
||||
check_Fortran_compiler_flag("-fno-second-underscore" FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
if(FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
|
@ -296,7 +294,6 @@ if(ENABLE_MSCG)
|
|||
endif()
|
||||
file(GLOB MSCG_SOURCES ${LAMMPS_LIB_MSCG_BIN_DIR}/*.cpp)
|
||||
add_library(mscg STATIC ${MSCG_SOURCES})
|
||||
set_target_properties(mscg PROPERTIES SOVERSION ${SOVERSION})
|
||||
list(APPEND LAMMPS_LINK_LIBS mscg)
|
||||
target_compile_options(mscg PRIVATE -DDIMENSION=3 -D_exclude_gromacs=1)
|
||||
target_include_directories(mscg PUBLIC ${LAMMPS_LIB_MSCG_BIN_DIR})
|
||||
|
@ -358,7 +355,6 @@ foreach(SIMPLE_LIB REAX MEAM POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD
|
|||
file(GLOB_RECURSE ${PKG_LIB}_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/*.F
|
||||
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/*.c ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/*.cpp)
|
||||
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
|
||||
set_target_properties(${PKG_LIB} PROPERTIES SOVERSION ${SOVERSION})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PKG_LIB})
|
||||
if(PKG_LIB STREQUAL awpmd)
|
||||
target_include_directories(awpmd PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/awpmd/systems/interact ${LAMMPS_LIB_SOURCE_DIR}/awpmd/ivutils/include)
|
||||
|
@ -580,8 +576,8 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR})
|
|||
############################################
|
||||
add_library(lammps ${LIB_SOURCES})
|
||||
target_link_libraries(lammps ${LAMMPS_LINK_LIBS})
|
||||
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
|
||||
install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
|
||||
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps.pc @ONLY)
|
||||
|
|
Loading…
Reference in New Issue