-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into tile-management, with a few changes
- rename core/include/json to core/include/jsoncpp and update references in CMake files - add libtess2 linking to OS X and iOS builds Note: Android build still not working through CMake, may need to modify the toolchain ourselves :\ Conflicts: Makefile core/src/sceneDirector/sceneDirector.h core/src/tangramNativeApp.cpp core/src/viewModule/viewModule.h ios/TangramiOS/TangramiOS.xcodeproj/project.pbxproj ios/resources/Main_iPhone.storyboard
- Loading branch information
Showing
75 changed files
with
2,386 additions
and
801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(tangram) | ||
|
||
# cmake output configuration | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
# platform lookup | ||
set(SUPPORTED_TARGETS darwin ios android) | ||
|
||
if(NOT PLATFORM_TARGET) | ||
string(TOLOWER "${CMAKE_SYSTEM_NAME}" varplatform) | ||
string(TOUPPER "${CMAKE_SYSTEM_NAME}" VARPLATFORM) | ||
|
||
message(STATUS "No target defined (give as parameter -DPLATFORM_TARGET=platform_name).") | ||
message(STATUS "Targets available: ${SUPPORTED_TARGETS}.") | ||
message(STATUS "Will use your OS: ${varplatform}.") | ||
|
||
set(PLATFORM_TARGET ${varplatform}) | ||
else() | ||
string(TOLOWER "${PLATFORM_TARGET}" varplatform) | ||
string(TOUPPER "${PLATFORM_TARGET}" VARPLATFORM) | ||
|
||
message(STATUS "Platform chosen : ${VARPLATFORM}") | ||
endif() | ||
|
||
list(FIND SUPPORTED_TARGETS ${varplatform} target_in_list) | ||
|
||
if(target_in_list EQUAL -1) | ||
message(SEND_ERROR "${varplatform} not in supported targets: ${SUPPORTED_TARGETS}") | ||
return() | ||
endif() | ||
|
||
# setting up cache variable platform | ||
set(PLATFORM ${varplatform} CACHE INTERNAL "platform" FORCE) | ||
|
||
# cmake inclusions and definitions | ||
# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/build/modules) | ||
set(CMAKE_TARGET_FILE ${PROJECT_SOURCE_DIR}/build/toolchains/${PLATFORM_TARGET}.cmake) | ||
|
||
include(${PROJECT_SOURCE_DIR}/build/utils/utils.cmake) | ||
|
||
message(STATUS "Including ${varplatform} dependent cmake file : ${CMAKE_TARGET_FILE}") | ||
include(${CMAKE_TARGET_FILE}) | ||
|
||
# dependent platform build | ||
build() | ||
|
||
link_libraries() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
if(NOT DEFINED ANDROID_ABI) | ||
set(ANDROID_ABI "armeabi-v7a") | ||
message(STATUS "Possible ABI values : armeabi-v7a (default), armeabi, x86") | ||
endif() | ||
message(STATUS "Android ABI : ${ANDROID_ABI}") | ||
|
||
if(NOT DEFINED ANDROID_TARGET) | ||
set(ANDROID_TARGET "android-19") | ||
endif() | ||
message(STATUS "Android target : ${ANDROID_TARGET}") | ||
|
||
set(ANDROID_STL gnustl_shared) | ||
|
||
include(${CMAKE_SOURCE_DIR}/build/toolchains/android.toolchain.cmake) | ||
|
||
add_definitions(-DPLATFORM_ANDROID) | ||
|
||
if(NOT MAKE_BUILD_TOOL) | ||
message(SEND_ERROR "Provide ndk make, located in <NDK_ROOT>/prebuilt/<OS>/bin/, -DMAKE_BUILD_TOOL=<NDK_PREBUILT_BIN>/make") | ||
return() | ||
else() | ||
set(CMAKE_BUILD_TOOL ${MAKE_BUILD_TOOL}) | ||
message(STATUS "Will use make prebuilt tool located at : ${CMAKE_BUILD_TOOL}") | ||
endif() | ||
|
||
# configurations | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -pedantic -llog -lz") | ||
set(CXX_FLAGS_DEBUG "${CXX_FLAGS_DEBUG} -g -O0") | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -fPIC") | ||
set(LIBCURL_PRECOMPILED_LIB ${CMAKE_SOURCE_DIR}/android/jni/precompiled/${ANDROID_ABI}/libcurl.a) | ||
|
||
# include dependency headers | ||
include_directories(${PROJECT_SOURCE_DIR}/android/jni/include) | ||
|
||
message(STATUS "Using curl precompiled static library : ${LIBCURL_PRECOMPILED_LIB}") | ||
|
||
# adding manually the two jni c++ files | ||
set(ADDITIONNAL_TARGET_DEPENDENT_SRC_FILES | ||
${CMAKE_SOURCE_DIR}/android/jni/jniExports.cpp | ||
${CMAKE_SOURCE_DIR}/android/jni/platform_android.cpp) | ||
|
||
# load core library | ||
set(INSTALL_CORE_LIBRARY "ON") | ||
set(CORE_LIB_TYPE SHARED) | ||
set(CORE_INSTALLATION_PATH ${CMAKE_SOURCE_DIR}/android/libs/${ANDROID_ABI}) | ||
set(CORE_LIB_DEPS GLESv2 ${LIBCURL_PRECOMPILED_LIB}) | ||
set(CORE_LIB_NAME tangram) # in order to have libtangram.so | ||
|
||
include_directories(${PROJECT_SOURCE_DIR}/core/include/) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/core) | ||
include_recursive_dirs(${PROJECT_SOURCE_DIR}/core/*.h) | ||
|
||
# link and build functions | ||
function(link_libraries) | ||
# nothing to do | ||
endfunction() | ||
|
||
function(build) | ||
# nothing to do | ||
endfunction() |
Oops, something went wrong.