Skip to content

Commit

Permalink
[Android] Updated CMake for Nvidia Nsight Tegra
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioLiebisch committed Nov 16, 2014
1 parent 6ef3cb2 commit 67a8684
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions cmake/toolchains/android.toolchain.cmake
Expand Up @@ -1094,6 +1094,9 @@ endif()
# don't leave libs/ directories in source directory
set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_LIBRARY_DIR})

# set the target system to enable cross-compiling for MSVC with CMake 3.1.0+
set(CMAKE_SYSTEM_NAME "Android")

# Variables controlling behavior or set by cmake toolchain:
# ANDROID_ABI: "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips"
# ANDROID_NATIVE_API_LEVEL: 3,4,5,8,9,14 (depends on NDK version)
Expand Down
2 changes: 1 addition & 1 deletion src/SFML/Audio/CMakeLists.txt
Expand Up @@ -54,7 +54,7 @@ include_directories(${OPENAL_INCLUDE_DIR} ${SNDFILE_INCLUDE_DIR})

# build the list of external libraries to link
if(SFML_OS_ANDROID)
list(APPEND AUDIO_EXT_LIBS -landroid -lOpenSLES)
list(APPEND AUDIO_EXT_LIBS android OpenSLES)
endif()
list(APPEND AUDIO_EXT_LIBS ${OPENAL_LIBRARY} ${SNDFILE_LIBRARY})

Expand Down
2 changes: 1 addition & 1 deletion src/SFML/Graphics/CMakeLists.txt
Expand Up @@ -145,7 +145,7 @@ endif()
if(SFML_OS_IOS)
list(APPEND GRAPHICS_EXT_LIBS "-framework OpenGLES")
elseif(SFML_OS_ANDROID)
list(APPEND GRAPHICS_EXT_LIBS -lz)
list(APPEND GRAPHICS_EXT_LIBS z)
endif()
list(APPEND GRAPHICS_EXT_LIBS ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})

Expand Down
4 changes: 2 additions & 2 deletions src/SFML/Window/CMakeLists.txt
Expand Up @@ -226,15 +226,15 @@ elseif(SFML_OS_MACOSX)
elseif(SFML_OS_IOS)
list(APPEND WINDOW_EXT_LIBS "-framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore -framework CoreMotion")
elseif(SFML_OS_ANDROID)
list(APPEND WINDOW_EXT_LIBS "-landroid")
list(APPEND WINDOW_EXT_LIBS android)
endif()
if(SFML_OPENGL_ES)
if(SFML_OS_LINUX)
list(APPEND WINDOW_EXT_LIBS ${EGL_LIBRARY} ${GLES_LIBRARY})
elseif(SFML_OS_IOS)
list(APPEND WINDOW_EXT_LIBS "-framework OpenGLES")
elseif(SFML_OS_ANDROID)
list(APPEND WINDOW_EXT_LIBS "-lEGL -lGLESv1_CM")
list(APPEND WINDOW_EXT_LIBS EGL GLESv1_CM)
endif()
else()
list(APPEND WINDOW_EXT_LIBS ${OPENGL_gl_LIBRARY})
Expand Down

0 comments on commit 67a8684

Please sign in to comment.