Sisyphus repository
Last update: 25 january 2020 | SRPMs: 17488 | Visits: 17078053
en ru br
ALT Linux repos
S:2.1.2-alt2.1

Group :: System/Libraries
RPM: libbox2d

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: Box2D_CMake.patch
Download


diff -ur Box2D_v2.1.2.orig/Box2D/Box2D/CMakeLists.txt Box2D_v2.1.2/Box2D/Box2D/CMakeLists.txt
--- Box2D_v2.1.2.orig/Box2D/Box2D/CMakeLists.txt	2010-07-06 11:22:24.936054677 +0000
+++ Box2D_v2.1.2/Box2D/Box2D/CMakeLists.txt	2010-07-06 11:24:22.284051558 +0000
@@ -165,13 +165,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_DESTINATION})
 	endif()
 	if(BOX2D_BUILD_STATIC)
-		install(TARGETS Box2D EXPORT Box2D-targets DESTINATION lib)
+		install(TARGETS Box2D EXPORT Box2D-targets DESTINATION ${LIB_DESTINATION})
 	endif()
 
 	# install build system hooks for third-party apps
-	install(EXPORT Box2D-targets DESTINATION lib/Box2D)
-	install(FILES Box2DConfig.cmake DESTINATION lib/Box2D)
-endif(BOX2D_INSTALL)
\ No newline at end of file
+	install(EXPORT Box2D-targets DESTINATION ${LIB_DESTINATION}/Box2D)
+	install(FILES Box2DConfig.cmake DESTINATION ${LIB_DESTINATION}/Box2D)
+endif(BOX2D_INSTALL)
diff -ur Box2D_v2.1.2.orig/Box2D/CMakeLists.txt Box2D_v2.1.2/Box2D/CMakeLists.txt
--- Box2D_v2.1.2.orig/Box2D/CMakeLists.txt	2010-07-06 11:22:24.824050484 +0000
+++ Box2D_v2.1.2/Box2D/CMakeLists.txt	2010-07-06 11:22:46.088049084 +0000
@@ -10,8 +10,8 @@
 
 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_SHARED "Build Box2D shared libraries" ON)
+option(BOX2D_BUILD_STATIC "Build Box2D static libraries" OFF)
 option(BOX2D_BUILD_EXAMPLES "Build Box2D examples" ON)
 
 set(BOX2D_VERSION 2.1.0)
@@ -26,11 +26,12 @@
 
   # Testbed and dependencies.
   find_package(OpenGL REQUIRED)
-  add_subdirectory(freeglut)
-  add_subdirectory(glui)
+  find_package(GLUT REQUIRED)
+  #find_libraries(GLUT_LIBRARY glut)
+  find_library(GLUI_LIBRARY glui)
   add_subdirectory(Testbed)
 endif(BOX2D_BUILD_EXAMPLES)
 
 if(BOX2D_INSTALL_DOC)
   install(DIRECTORY Documentation DESTINATION share/doc/Box2D PATTERN ".svn" EXCLUDE)
-endif(BOX2D_INSTALL_DOC)
\ No newline at end of file
+endif(BOX2D_INSTALL_DOC)
diff -ur Box2D_v2.1.2.orig/Box2D/HelloWorld/CMakeLists.txt Box2D_v2.1.2/Box2D/HelloWorld/CMakeLists.txt
--- Box2D_v2.1.2.orig/Box2D/HelloWorld/CMakeLists.txt	2010-07-06 11:22:24.160048878 +0000
+++ Box2D_v2.1.2/Box2D/HelloWorld/CMakeLists.txt	2010-07-06 11:22:46.264054528 +0000
@@ -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 -ur Box2D_v2.1.2.orig/Box2D/Testbed/CMakeLists.txt Box2D_v2.1.2/Box2D/Testbed/CMakeLists.txt
--- Box2D_v2.1.2.orig/Box2D/Testbed/CMakeLists.txt	2010-07-06 11:22:24.152054066 +0000
+++ Box2D_v2.1.2/Box2D/Testbed/CMakeLists.txt	2010-07-06 11:22:46.196052249 +0000
@@ -1,5 +1,7 @@
 # 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 )
+
+link_directories(${CMAKE_BINARY_DIR}/Box2D)
 
 # Define the framework files.
 set(Testbed_Framework_SRCS
@@ -75,7 +77,7 @@
 target_link_libraries (
 	Testbed
 	Box2D
-	freeglut_static
+	glut
 	glui
 	${OPENGL_LIBRARIES}
 ) 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin