Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > 4c0e7d7aad8e4e16d37219d5ad5be21e > files > 2

box2d-2.2.1-1mdv2010.2.src.rpm

diff -urN Box2D_v2.2.1/Box2D/CMakeLists.txt Box2D_v2.2.1-patched/Box2D/CMakeLists.txt
--- Box2D_v2.2.1/Box2D/CMakeLists.txt	2011-08-21 19:49:54.000000000 +1100
+++ Box2D_v2.2.1-patched/Box2D/CMakeLists.txt	2012-03-11 20:42:15.519211902 +1100
@@ -193,13 +193,13 @@
 
 	# install libraries
 	if(BOX2D_BUILD_SHARED)
-		install(TARGETS Box2D_shared EXPORT Box2D-targets DESTINATION lib)
+		install(TARGETS Box2D_shared EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR})
 	endif()
 	if(BOX2D_BUILD_STATIC)
-		install(TARGETS Box2D EXPORT Box2D-targets DESTINATION lib)
+		install(TARGETS Box2D EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR})
 	endif()
 
 	# install build system hooks for third-party apps
-	install(EXPORT Box2D-targets DESTINATION lib/Box2D)
-	install(FILES Box2DConfig.cmake DESTINATION lib/Box2D)
+	install(EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR}/Box2D)
+	install(FILES Box2DConfig.cmake DESTINATION ${LIB_INSTALL_DIR}/Box2D)
 endif(BOX2D_INSTALL)
\ В конце файла нет новой строки
diff -urN Box2D_v2.2.1/CMakeLists.txt Box2D_v2.2.1-patched/CMakeLists.txt
--- Box2D_v2.2.1/CMakeLists.txt	2011-03-06 17:29:20.000000000 +1000
+++ Box2D_v2.2.1-patched/CMakeLists.txt	2012-03-11 20:53:40.829900244 +1100
@@ -10,11 +10,11 @@
 
 option(BOX2D_INSTALL "Install Box2D libs, includes, and CMake scripts" ${BOX2D_INSTALL_BY_DEFAULT})
 option(BOX2D_INSTALL_DOC "Install Box2D documentation" OFF)
-option(BOX2D_BUILD_SHARED "Build Box2D shared libraries" OFF)
-option(BOX2D_BUILD_STATIC "Build Box2D static libraries" ON)
-option(BOX2D_BUILD_EXAMPLES "Build Box2D examples" ON)
+option(BOX2D_BUILD_SHARED "Build Box2D shared libraries" OFF)
+option(BOX2D_BUILD_STATIC "Build Box2D static libraries" ON)
+option(BOX2D_BUILD_EXAMPLES "Build Box2D examples" OFF)
 
-set(BOX2D_VERSION 2.1.0)
+set(BOX2D_VERSION 2.2.1)
 
 # The Box2D library.
 add_subdirectory(Box2D)
@@ -25,8 +25,7 @@
 
   # Testbed and dependencies.
   find_package(OpenGL REQUIRED)
-  add_subdirectory(freeglut)
-  add_subdirectory(glui)
+  find_package(GLUT REQUIRED)
   add_subdirectory(Testbed)
 endif(BOX2D_BUILD_EXAMPLES)
 
diff -urN Box2D_v2.2.1/HelloWorld/CMakeLists.txt Box2D_v2.2.1-patched/HelloWorld/CMakeLists.txt
--- Box2D_v2.2.1/HelloWorld/CMakeLists.txt	2010-02-28 10:42:06.000000000 +1000
+++ Box2D_v2.2.1-patched/HelloWorld/CMakeLists.txt	2012-03-11 20:45:38.656146667 +1100
@@ -1,4 +1,5 @@
 # Hello World examples
 include_directories (${Box2D_SOURCE_DIR})
+link_directories(${CMAKE_BINARY_DIR}/Box2D)
 add_executable(HelloWorld HelloWorld.cpp)
 target_link_libraries (HelloWorld Box2D)
diff -urN Box2D_v2.2.1/Testbed/CMakeLists.txt Box2D_v2.2.1-patched/Testbed/CMakeLists.txt
--- Box2D_v2.2.1/Testbed/CMakeLists.txt	2011-09-06 17:47:48.000000000 +1100
+++ Box2D_v2.2.1-patched/Testbed/CMakeLists.txt	2012-03-11 20:46:15.052666686 +1100
@@ -1,5 +1,5 @@
 # Some flags for Freeglut and GLUI.
-add_definitions( -DFREEGLUT_EXPORTS -DFREEGLUT_STATIC -D_CRT_SECURE_NO_WARNINGS )
+add_definitions( -DFREEGLUT_EXPORTS -D_CRT_SECURE_NO_WARNINGS )
 
 # Define the framework files.
 set(Testbed_Framework_SRCS
@@ -85,7 +85,7 @@
 target_link_libraries (
 	Testbed
 	Box2D
-	freeglut_static
+	glut
 	glui
 	${ADDITIONAL_LIBRARIES}
 	${OPENGL_LIBRARIES}