termux-packages/x11-packages/freeglut/CMakeLists.txt.patch

98 lines
3.6 KiB
Diff

diff -uNr freeglut-3.0.0/CMakeLists.txt freeglut-3.0.0.mod/CMakeLists.txt
--- freeglut-3.0.0/CMakeLists.txt 2015-02-18 06:59:57.000000000 +0200
+++ freeglut-3.0.0.mod/CMakeLists.txt 2019-05-26 23:09:11.933353781 +0300
@@ -131,42 +131,6 @@
)
ENDIF()
-ELSEIF(ANDROID OR BLACKBERRY)
- # BlackBerry and Android share some similar design concepts and ideas, as with many mobile devices.
- # As such, some classes can be shared between the two. XXX: Possibly rename shareable classes to
- # a more generic name. *_stub? *_mobile?
- LIST(APPEND FREEGLUT_SRCS
- src/android/fg_cursor_android.c
- src/android/fg_ext_android.c
- src/android/fg_gamemode_android.c
- src/android/fg_joystick_android.c
- src/android/fg_spaceball_android.c
- )
- IF(ANDROID)
- LIST(APPEND FREEGLUT_SRCS
- src/android/native_app_glue/android_native_app_glue.c
- src/android/native_app_glue/android_native_app_glue.h
- src/android/fg_internal_android.h
- src/android/fg_init_android.c
- src/android/fg_input_devices_android.c
- src/android/fg_main_android.c
- src/android/fg_main_android.h
- src/android/fg_runtime_android.c
- src/android/fg_state_android.c
- src/android/fg_structure_android.c
- src/android/fg_window_android.c
- )
- ELSE()
- LIST(APPEND FREEGLUT_SRCS
- src/blackberry/fg_internal_blackberry.h
- src/blackberry/fg_init_blackberry.c
- src/x11/fg_input_devices_x11.c
- src/blackberry/fg_main_blackberry.c
- src/blackberry/fg_state_blackberry.c
- src/blackberry/fg_structure_blackberry.c
- src/blackberry/fg_window_blackberry.c
- )
- ENDIF()
ELSE()
LIST(APPEND FREEGLUT_SRCS
src/x11/fg_cursor_x11.c
@@ -255,7 +219,7 @@
ENDIF(CMAKE_COMPILER_IS_GNUCC)
INCLUDE(CheckIncludeFiles)
-IF(UNIX AND NOT(ANDROID OR BLACKBERRY))
+IF(UNIX AND NOT(BLACKBERRY))
FIND_PACKAGE(X11 REQUIRED)
INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
LIST(APPEND LIBS ${X11_LIBRARIES})
@@ -273,11 +237,7 @@
LIST(APPEND LIBS ${X11_Xinput_LIB})
ENDIF()
ENDIF()
-IF(ANDROID)
- # -landroid for ANativeWindow
- # -llog for native Android logging
- LIST(APPEND LIBS android log)
-ELSEIF(BLACKBERRY)
+IF(BLACKBERRY)
# -lbps for event loop
# -screen for native screen
LIST(APPEND LIBS bps screen)
@@ -391,17 +351,6 @@
IF(FREEGLUT_BUILD_STATIC_LIBS)
SET_TARGET_PROPERTIES(freeglut_static PROPERTIES OUTPUT_NAME ${LIBNAME})
ENDIF()
- IF(ANDROID)
- # Not in CMake toolchain file, because the toolchain
- # file is called several times and generally doesn't
- # seem to be meant for modifying CFLAGS:
- # '-mandroid' is not mandatory but doesn't hurt
- # '-O0 -gstabs+' helps the currently buggy GDB port
- # Too late to manipulate ENV: SET(ENV{CFLAGS} "$ENV{CFLAGS} -mandroid")
- # Not using _INIT variables, they seem to be used internally only
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mandroid")
- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -gstabs+")
- ENDIF()
ENDIF()
IF(FREEGLUT_BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES(freeglut ${LIBS})
@@ -498,9 +447,7 @@
IF(WIN32)
SET(PC_LIBS_PRIVATE "-lopengl32 -lwinmm -lgdi32 -lm")
ELSEIF(FREEGLUT_GLES)
- IF(ANDROID)
- SET(PC_LIBS_PRIVATE "-llog -landroid -lGLESv2 -lGLESv1_CM -lEGL -lm")
- ELSEIF(BLACKBERRY)
+ IF(BLACKBERRY)
IF(PLAYBOOK)
SET(PC_LIBS_PRIVATE "-lbps -lscreen -lGLESv2 -lGLESv1_CM -lEGL -lm")
ELSE()