fixed install target:

- freeglut shared library now in /bin dir, as is its pdb file
- its import library, the static library and the static lib's debug info
  are installed in /lib


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1399 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2012-11-17 02:20:20 +00:00
parent a7771ab4b2
commit a1daa9fc77

View File

@ -1,5 +1,5 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(freeglut) PROJECT(freeglut)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# NOTE: On Windows and Cygwin, the dll's are placed in the # NOTE: On Windows and Cygwin, the dll's are placed in the
# CMAKE_RUNTIME_OUTPUT_DIRECTORY, while their corresponding import # CMAKE_RUNTIME_OUTPUT_DIRECTORY, while their corresponding import
@ -9,6 +9,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Static libraries end up in CMAKE_ARCHIVE_OUTPUT_DIRECTORY on all # Static libraries end up in CMAKE_ARCHIVE_OUTPUT_DIRECTORY on all
# platforms. # platforms.
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
# setup version numbers # setup version numbers
@ -365,19 +366,26 @@ IF(BUILD_STATIC_LIBS)
TARGET_LINK_LIBRARIES(freeglut_static ${LIBS}) TARGET_LINK_LIBRARIES(freeglut_static ${LIBS})
ENDIF() ENDIF()
IF(BUILD_SHARED_LIBS) IF(BUILD_SHARED_LIBS)
INSTALL(TARGETS freeglut DESTINATION lib) INSTALL(TARGETS freeglut
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
IF(INSTALL_PDB) IF(INSTALL_PDB)
INSTALL(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/freeglut${CMAKE_DEBUG_POSTFIX}.pdb INSTALL(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/freeglut${CMAKE_DEBUG_POSTFIX}.pdb
DESTINATION lib DESTINATION bin
CONFIGURATIONS Debug) CONFIGURATIONS Debug)
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(BUILD_STATIC_LIBS) IF(BUILD_STATIC_LIBS)
INSTALL(TARGETS freeglut_static DESTINATION lib) INSTALL(TARGETS freeglut_static
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
IF(INSTALL_PDB) IF(INSTALL_PDB)
INSTALL(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/freeglut_static${CMAKE_DEBUG_POSTFIX}.pdb INSTALL(FILES ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/Debug/freeglut_static${CMAKE_DEBUG_POSTFIX}.pdb
DESTINATION lib DESTINATION lib
CONFIGURATIONS Debug) CONFIGURATIONS Debug)
ENDIF() ENDIF()