From Jorge Izquierdo Ciges, "Mostly small changes to add more compile options, and shared linking (still testing that capability, but this enables on a compile basis if the user wants). Robert, when you give the Ok I'll update/rewrite the Android section in the old/new wiki you'll say where is better. Mostly to be clear for the future users what options can configure and what are their purpose."
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
MACRO(SETUP_ANDROID_LIBRARY LIB_NAME)
|
||||
|
||||
foreach(arg ${TARGET_LIBRARIES})
|
||||
set(MODULE_LIBS "${MODULE_LIBS} -l${arg}")
|
||||
endforeach(arg ${TARGET_LIBRARIES})
|
||||
#foreach(arg ${TARGET_LIBRARIES})
|
||||
# set(MODULE_LIBS "${MODULE_LIBS} -l${arg}")
|
||||
#endforeach(arg ${TARGET_LIBRARIES})
|
||||
|
||||
foreach(arg ${TARGET_SRC})
|
||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" n_f ${arg})
|
||||
set(MODULE_SOURCES "${MODULE_SOURCES} ${n_f}")
|
||||
IF ("${arg}" MATCHES ".*\\.c$" OR "${arg}" MATCHES ".*\\.cpp$")
|
||||
#We only include source files, not header files, this removes anoying warnings
|
||||
set(MODULE_SOURCES "${MODULE_SOURCES} ${n_f}")
|
||||
ENDIF()
|
||||
endforeach(arg ${TARGET_SRC})
|
||||
|
||||
#SET(MODULE_INCLUDES "${CMAKE_SOURCE_DIR}/include include")
|
||||
@@ -35,7 +38,8 @@ MACRO(SETUP_ANDROID_LIBRARY LIB_NAME)
|
||||
ELSEIF(OSG_GLES2_AVAILABLE)
|
||||
SET(OPENGLES_LIBRARY -lGLESv2)
|
||||
ENDIF()
|
||||
set(MODULE_LIBS "${MODULE_LIBS} ${OPENGLES_LIBRARY} -ldl")
|
||||
#${MODULE_LIBS}
|
||||
set(MODULE_LIBS_FLAGS "${OPENGLES_LIBRARY} -ldl")
|
||||
if(NOT CPP_EXTENSION)
|
||||
set(CPP_EXTENSION "cpp")
|
||||
endif()
|
||||
@@ -44,8 +48,12 @@ MACRO(SETUP_ANDROID_LIBRARY LIB_NAME)
|
||||
ENDIF()
|
||||
IF("MODULE_USER_STATIC_OR_DYNAMIC" MATCHES "STATIC")
|
||||
SET(MODULE_BUILD_TYPE "\$\(BUILD_STATIC_LIBRARY\)")
|
||||
SET(MODULE_LIBS_SHARED " ")
|
||||
SET(MODULE_LIBS_STATIC ${TARGET_LIBRARIES})
|
||||
ELSE()
|
||||
SET(MODULE_BUILD_TYPE "\$\(BUILD_DYNAMIC_LIBRARY\)")
|
||||
SET(MODULE_BUILD_TYPE "\$\(BUILD_SHARED_LIBRARY\)")
|
||||
SET(MODULE_LIBS_SHARED ${TARGET_LIBRARIES})
|
||||
SET(MODULE_LIBS_STATIC " ")
|
||||
ENDIF()
|
||||
set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} ${LIB_NAME}")
|
||||
set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${CMAKE_CURRENT_BINARY_DIR}/Android.mk \n")
|
||||
|
||||
Reference in New Issue
Block a user