Add checks for debug flags for android
(cherry picked from commit e6baf9cee8
)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1865 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
a5fe10f70c
commit
578b0d795e
@ -352,6 +352,7 @@ ENDIF()
|
|||||||
|
|
||||||
INCLUDE(CheckFunctionExists)
|
INCLUDE(CheckFunctionExists)
|
||||||
INCLUDE(CheckTypeSize)
|
INCLUDE(CheckTypeSize)
|
||||||
|
INCLUDE(CheckCCompilerFlag)
|
||||||
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
|
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
|
||||||
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
|
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
|
||||||
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
|
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
|
||||||
@ -470,7 +471,14 @@ ELSE()
|
|||||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mandroid")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mandroid")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -gstabs+")
|
CHECK_C_COMPILER_FLAG(-O0 HAVE_O0_FLAG)
|
||||||
|
IF(HAVE_O0_FLAG)
|
||||||
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
|
||||||
|
ENDIF()
|
||||||
|
CHECK_C_COMPILER_FLAG(-gstabs+ HAVE_GSTABSP_FLAG)
|
||||||
|
IF(HAVE_gstabsp_FLAG)
|
||||||
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -gstabs+")
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(FREEGLUT_BUILD_SHARED_LIBS)
|
IF(FREEGLUT_BUILD_SHARED_LIBS)
|
||||||
|
Reference in New Issue
Block a user