Change-Id: Ib25e6b2a34080632e1d531da3194680cc8c6825b
message(WARNING "Shared system libraries requested, and static Gromacs libraries requested.")
endif()
else()
- message(FATAL_ERROR "BUILD_SHARED_LIBS=ON not yet working for Windows in the master branch")
+ if(MINGW)
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols ${CMAKE_SHARED_LINKER_FLAGS}")
+ else()
+ message(FATAL_ERROR "BUILD_SHARED_LIBS=ON not yet working for Windows in the master branch")
+ endif()
if(GMX_PREFER_STATIC_LIBS)
#this combination segfaults (illegal passing of file handles)
message(FATAL_ERROR "Static system libraries requested, and shared Gromacs libraries requested.")
# Only install the library in mdrun-only mode if it is actually necessary
# for the binary
if (NOT GMX_BUILD_MDRUN_ONLY OR BUILD_SHARED_LIBS)
- install(TARGETS libgromacs DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries)
+ install(TARGETS libgromacs
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ COMPONENT libraries)
endif()
if (NOT GMX_BUILD_MDRUN_ONLY)