set_target_properties(mdrun PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
endif()
-# Construct component groups for installation
-foreach(PROGRAM ${GMX_KERNEL_PROGRAMS} mdrun)
+# Construct component groups for installation; note that a component may
+# belong to only one group
+foreach(PROGRAM ${GMX_KERNEL_PROGRAMS})
set(CPACK_COMPONENT_${PROGRAM}_GROUP tools)
endforeach()
set(CPACK_COMPONENT_MDRUN_GROUP mdrun)
-# Create custom install-xxxx targets, component dependences,
-# and trigger the installation
foreach(PROGRAM ${GMX_KERNEL_PROGRAMS} mdrun)
- set(CPACK_COMPONENT_${PROGRAM}_DEPENDS libraries)
+ # Manage CPack component dependencies
+ set(CPACK_COMPONENT_${PROGRAM}_DEPENDS libraries libraries-gmxpreprocess)
+
+ # Create custom install-xxxx target
if (BUILD_SHARED_LIBS)
# If shared libraries are used, we need to install the libraries in
# addition to the mdrun binary.
add_custom_target(install-${PROGRAM}
COMMAND ${CMAKE_COMMAND} -DCOMPONENT=libraries
-P ${CMAKE_BINARY_DIR}/cmake_install.cmake
+ COMMAND ${CMAKE_COMMAND} -DCOMPONENT=libraries-gmxpreprocess
+ -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${PROGRAM}
-P ${CMAKE_BINARY_DIR}/cmake_install.cmake
COMMENT "Installing ${PROGRAM}")
COMMENT "Installing ${PROGRAM}")
endif()
add_dependencies(install-${PROGRAM} ${PROGRAM})
+
+ # Finally, trigger installation
install(
TARGETS ${PROGRAM}
COMPONENT ${PROGRAM}
)
endforeach()
-install(TARGETS gmxpreprocess DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries)
+install(TARGETS gmxpreprocess DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries-gmxpreprocess)
endif(GMX_FAHCORE)
gmx_add_man_page(${TOOL})
endif()
- # Create custom install-xxxx targets, manage components and
- # component groups, and trigger the installation
- set(CPACK_COMPONENT_${TOOL}_DEPENDS libraries)
+ # Manage CPack component dependencies, and group membership; note that
+ # a component may belong to only one group
+ set(CPACK_COMPONENT_${TOOL}_DEPENDS libraries libraries-gmxana)
set(CPACK_COMPONENT_${TOOL}_GROUP tools)
+
+ # Create custom install-xxxx target
if (BUILD_SHARED_LIBS)
# If shared libraries are used, we need to install the libraries in
# addition to the tool binary.
add_custom_target(install-${TOOL}
COMMAND ${CMAKE_COMMAND} -DCOMPONENT=libraries
-P ${CMAKE_BINARY_DIR}/cmake_install.cmake
+ COMMAND ${CMAKE_COMMAND} -DCOMPONENT=libraries-gmxana
+ -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${TOOL}
-P ${CMAKE_BINARY_DIR}/cmake_install.cmake
COMMENT "Installing ${TOOL}")
COMMENT "Installing ${TOOL}")
endif()
add_dependencies(install-${TOOL} ${TOOL})
+
+ # Finally, trigger installation
install(
TARGETS ${TOOL}
COMPONENT ${TOOL}
)
endforeach()
-install(TARGETS gmxana DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries)
+install(TARGETS gmxana DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries-gmxana)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libgmxana.pc.cmakein ${CMAKE_CURRENT_BINARY_DIR}/libgmxana.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgmxana.pc