adding option (on windows) to also install .pdb files

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1372 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2012-07-24 17:38:58 +00:00
parent 2a1ed68305
commit 1b92446cdd

View File

@ -24,11 +24,20 @@ set(VERSION_PATCH 0)
OPTION(BUILD_SHARED_LIBS "Build FreeGLUT shared library." ON)
OPTION(BUILD_STATIC_LIBS "Build FreeGLUT static library." ON)
# option to also copy .pdb files to install directory when executing
# INSTALL target
IF(MSVC)
OPTION(INSTALL_PDB "Also install .pdb files" ON)
ELSE()
SET(INSTALL_PDB OFF)
ENDIF()
# OpenGL ES support
OPTION(FREEGLUT_GLES1 "Use OpenGL ES 1.x (requires EGL)" OFF)
OPTION(FREEGLUT_GLES2 "Use OpenGL ES 2.x (requires EGL) (overrides BUILD_GLES1)" OFF)
SET(FREEGLUT_HEADERS
include/GL/freeglut.h
include/GL/freeglut_ext.h
@ -356,11 +365,22 @@ IF(BUILD_STATIC_LIBS)
TARGET_LINK_LIBRARIES(freeglut_static ${LIBS})
ENDIF()
IF(BUILD_SHARED_LIBS)
INSTALL(TARGETS freeglut DESTINATION lib)
IF(INSTALL_PDB)
INSTALL(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/freeglut${CMAKE_DEBUG_POSTFIX}.pdb
DESTINATION lib
CONFIGURATIONS Debug)
ENDIF()
ENDIF()
IF(BUILD_STATIC_LIBS)
INSTALL(TARGETS freeglut_static DESTINATION lib)
IF(INSTALL_PDB)
INSTALL(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/freeglut_static${CMAKE_DEBUG_POSTFIX}.pdb
DESTINATION lib
CONFIGURATIONS Debug)
ENDIF()
ENDIF()
INSTALL(FILES ${FREEGLUT_HEADERS} DESTINATION include/GL)