fixed install target:
authorDiederick Niehorster <dcnieho@gmail.com>
Sat, 17 Nov 2012 02:20:20 +0000 (02:20 +0000)
committerDiederick Niehorster <dcnieho@gmail.com>
Sat, 17 Nov 2012 02:20:20 +0000 (02:20 +0000)
- 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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1399 7f0cb862-5218-0410-a997-914c9d46530a

CMakeLists.txt

index ee7a4fb..37d61aa 100644 (file)
@@ -1,5 +1,5 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
 PROJECT(freeglut)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
 # NOTE: On Windows and Cygwin, the dll's are placed in the
 # 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
 # platforms.
 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)
 
 # setup version numbers
@@ -365,19 +366,26 @@ IF(BUILD_STATIC_LIBS)
     TARGET_LINK_LIBRARIES(freeglut_static ${LIBS})
 ENDIF()
 
-
 IF(BUILD_SHARED_LIBS)
-    INSTALL(TARGETS freeglut DESTINATION lib)
+    INSTALL(TARGETS freeglut
+            RUNTIME DESTINATION bin
+            LIBRARY DESTINATION lib
+            ARCHIVE DESTINATION lib
+    )
     IF(INSTALL_PDB)
-        INSTALL(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/freeglut${CMAKE_DEBUG_POSTFIX}.pdb
-            DESTINATION lib
+        INSTALL(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/freeglut${CMAKE_DEBUG_POSTFIX}.pdb
+            DESTINATION bin
                        CONFIGURATIONS Debug)
     ENDIF()
 ENDIF()
 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)
-        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
                        CONFIGURATIONS Debug)
     ENDIF()