[CMake] How to install a shared library on a windows system
Torri, Stephen CIV NSWCDD, W15
stephen.torri at navy.mil
Fri Jun 11 11:59:58 EDT 2010
I am running into a problem with a project that installs a shared library. The files for the project are all places in the correct directories. What I am finding is that when I compile a project with uses the shared library it compiles and links correctly but the library is not found when the executable is started. Here is my CPACK configuration for the project.
Q 1: Am I missing some command that is suppose to tell windows that in my installation directory is another shared library it should use?
Q 2: How can I skip the page in the NSIS wizard to not ask the user if they want to add an entry to the start menu?
Q 3: As a library do I need to have a page in the NSIS wizard asking the user if they want to add the installation directory to the system PATH? I thought that only applies to executables. This project does not install any EXE files.
Stephen
------------------------------------------
#-----------------------------------------------------
# CPACK
#-----------------------------------------------------
#-----------------------------
# CPACK DESCRIPTION INFORMATION
#-----------------------------
SET(CPACK_PACKAGE_NAME "Project")
SET(CPACK_PACKAGE_VENDOR "Work")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Does something")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
SET(CPACK_PACKAGE_VERSION "0.2.0")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "2")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "PROJECT ${CPACK_PACKAGE_VERSION}")
#-----------------------------
# INSTALLATION INFORMATION
#-----------------------------
SET(CPACK_COMPONENTS_ALL libraries headers)
SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Dynamic library used to build programs with Project interface")
SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
SET(CPACK_COMPONENT_HEADERS_DESCRIPTION "C++ header files for use with Project interface")
SET(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
SET(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "All of the tools necessary to develop against the Project interface")
#-----------------------------
# INSTALLATION TYPES
#-----------------------------
SET(CPACK_ALL_INSTALL_TYPES Full Developer)
SET(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Full Developer)
SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Full Developer)
IF (WIN32)
SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\InstallIcon.bmp")
SET(CPACK_NSIS_MODIFY_PATH ON)
SET(CPACK_GENERATOR "NSIS")
ELSE (UNIX)
SET(CPACK_GENERATOR "STGZ;TGZ;RPM")
ENDIF(WIN32)
# Always include this last.
INCLUDE(CPack)
----------------------------------------
Stephen Torri, PhD
NAVAL SURFACE WARFARE CENTER DAHLGREN
17214 Ave B Suite 121
Dahlgren, Va. 22448
540-653-1082
I am not a contracting officer. I cannot modify or initiate contracts, nor do I have the authority to financially commit the government in any way.
More information about the CMake
mailing list