Commit Graph

74 Commits

Author SHA1 Message Date
Yao Wei Tjong 姚伟忠 2980809aed Adapt to EMSDK changes. [ci only: Web] 2020-08-31 01:39:04 +08:00
Yao Wei Tjong 姚伟忠 af3c98b324 Fix the EMSCRIPTEN_ROOT_PATH auto-detection. 2020-01-24 00:20:26 +08:00
Yao Wei Tjong 姚伟忠 dabfdbd213 Remove unsupported build options for Web platform. 2020-01-12 14:19:44 +08:00
urho3d-travis-ci 1151b8a2d6 Travis CI: bump copyright to 2020. 2020-01-05 06:21:40 +00:00
urho3d-travis-ci a476f0c401 Travis CI: bump copyright to 2019. 2019-01-12 01:00:16 +00:00
Yao Wei Tjong 姚伟忠 0fc21934f5 Cleanup CMake build scripts and documentation update.
Close #743.
2018-08-09 23:08:45 +08:00
urho3d-travis-ci 70049ba582 Travis CI: bump copyright to 2018.
[cache clear]
2018-01-01 05:35:37 +00:00
Yao Wei Tjong 姚伟忠 9d84ccffe4 Initial attempt to support MODULE library type for Web platform.
Disallow memory growth when using MODULE lib-type.
Move the resource defining and checking logic into their own macros.
2017-03-26 22:18:35 +08:00
Yao Wei Tjong 姚伟忠 ff85c9522a Rename the module and toolchain names to follow new naming convention. 2017-03-06 22:12:27 +08:00
Yao Wei Tjong 姚伟忠 81d7b6a71b Rename CMake/Emscripten toolchain file to follow new naming convention. 2017-03-05 08:46:33 +08:00
Yao Wei Tjong 姚伟忠 75a5a06cd2 Make the CMake/Android toolchain file compatible with NDK 13c. 2017-03-05 08:46:22 +08:00
Yao Wei Tjong 姚伟忠 f1ac8a80e9 Minor refactor on CheckCompilerToolchain module. 2017-03-05 08:46:22 +08:00
Yao Wei Tjong 姚伟忠 0c88c99112 Allow possibility of building Urho3D without C++ exceptions feature.
Disallow Android build to turn off C++ RTTI feature.
2017-03-05 08:46:22 +08:00
Yao Wei Tjong 姚伟忠 2f8a80def4 Rewrite from scratch a new Android toolchain file.
The new toolchain file requires Android NDK r12b and above. Default to use 'arm-linux-androideabi-clang' toolchain and LLVM libc++ STL runtime.
Align all the compiler and linker flags according to new ndk-build configuration in Android NDK r12b, i.e. no more '-f[no-]strict-aliasing' and '-f[no-]omit-frame-pointer', but more stringent warnings check.
Improve over the old toolchain file where most of the options are now changeable after the initial configuration. The exceptions are ANDROID_NDK and ANDROID_TOOLCHAIN_NAME due to limitation of CMake.
Close #1441.
Other changes in this commit includes:
- Fix Android sample launcher app to support shared C++ STL runtime library.
- Remove temporary fix in FindUrho3D module as it is not required anymore with our new toolchain file.
- Fix Log::WriteRaw() method to pass the parameters correctly to __android_log_print() function.
- Fix enable_pch() macro to emit -fPIC compiler flags correctly based on target's POSITION_INDEPENDENT_CODE property.
- Fix linker flags for ld.bfd where it needs help to find the location of the rooted shared libraries. The flags are not required for ld.gold but they do no harm for gold linker.
- Enhance the CheckCompilerToolchain module to auto-detect if the NEON SIMD is enabled or not for Android build (based on the chosen ANDROID_ABI).
2017-03-05 08:45:40 +08:00
Yao Wei Tjong 姚伟忠 06638436c0 Prevent *-PREFIX and *-SYSROOT changes after the initial configuration.
When in try_compile() mode, quickly obtain the previously cached values stored in the (inner scope) environment variables and bypass all the checks (which are already done when the toolchain file is being processed at the start of CMake run).
2017-03-05 08:45:39 +08:00
Yao Wei Tjong 姚伟忠 f7e2303cab Use "SmileyHack" to inject CMake vars to get the right output suffix.
This fixes known issues with output binary suffix in the custom emscripten.toolchain.cmake and FindUrho3D.cmake modules.
2017-03-05 08:45:39 +08:00
Yao Wei Tjong 姚伟忠 84ad86e79e Fix toolchain files to honor *-PREFIX and *-SYSROOT as build options.
Due to the CMake try_compile() limitation, initial build option values (i.e. not env-vars) were not visible to all the CMake checks during inital configuration, preventing the build option from functioning as expected.
2017-03-05 08:45:39 +08:00
Yao Wei Tjong 姚伟忠 98bdf13583 Enhance toolchain files to first check on suitable ccache symlink.
If a suitable symlink is found in the standard ccache symlink directory then skip creating fallback symlink in the build tree.
2017-03-05 08:45:39 +08:00
Yao Wei Tjong 姚伟忠 d64b2e9aeb Fix auto-detection of host tool for Android cross-compiling build.
After using CMAKE_SYSROOT in the android.toolchain.cmake module, CMake will only find Doxygen when CMAKE_FIND_ROOT_PATH_MODE_PROGRAM is set to to NEVER. It is actually weird why it was working before when it was set to ONLY previously.
2017-03-05 08:45:39 +08:00
Yao Wei Tjong 姚伟忠 ffd24cafa1 Take advantage of CMAKE_SYSROOT available in the newer CMake.
Use CMAKE_SYSROOT to manage the sysroot automatically when cross-compiling instead of adding the '--sysroot' flag manually everywhere. We only need to add it manually in places where CMake does not, like in our custom GCC/Clang response file for PCH.
Differentiate between setting up header search path for system headers and for application headers so that GCC/Clang may suppress compilation warnings from the former, if any.
2017-03-05 08:45:39 +08:00
Yao Wei Tjong 姚伟忠 2738ca2546 Skip subsequent processing of toolchain file during inital config. 2017-03-05 08:45:39 +08:00
Yao Wei Tjong 姚伟忠 bbbbdb0108 Check native compiler toolchain is available before proceeding.
Some cross-compiling build tree configuration needs native compiler toolchain for host tool building via ExternalProject_Add(). This additional check ensures the native compiler toolchain is available up front before the build tree is even generated. Close #1300.
2017-03-05 08:45:21 +08:00
urho3d-travis-ci ee054a1507 Travis CI: bump copyright to 2017.
[ccache clear]
2017-01-01 13:01:31 +00:00
Johnathan Jenkins d78fc4020f minor typos 2016-10-28 13:07:14 -07:00
Yao Wei Tjong 姚伟忠 b21ff1895e Fix overlinking of EGL library in FindVideoCore.cmake module.
Remove hardcoding of indirect dependency libraries list in the FindUrho3D.cmake module. Instead we now rely on the linker to find those indirect dependencies automatically with our hint via "-runpath-link" linker flag, especially when cross-compiling.
Also setup GLESv2 (and GLESv1_CM) for Raspberry-Pi in the same manner as generic ARM and Android platforms.
2016-08-07 18:22:46 +08:00
Yao Wei Tjong 姚伟忠 5419f37a60 Realign the new generic ARM "platform" name with the 1.6 changelog. 2016-08-05 19:54:06 +08:00
Yao Wei Tjong 姚伟忠 87bee872e8 Add extra linker flags to make 64-bit ARM cross-compiling possible.
When cross-compiling we have already defined '--sysroot' to find the direct library dependencies. However when a shared library has its own dependencies (DT_NEEDED) then we need to supply extra linker flags to help the linker to find those indirect library dependecies in the sysroot.
Actually we also had this problem for 32-bit ARM cross-compiling, but we cheated in the earlier CI build jobs by using Linaro/Raspbian compiler toolchain. Somehow the Raspbian's linker simply "ignores" those indirect library dependencies or it uses other mean to locate them (but I doubt that), and so it does not have linker issues with libreadline.so (depends on tinfo), libGLESv2.so (depends on glapi), etc. The other ARM compiler toolchains from Linaro seem to be more strict in this regard. Most likely the raspbian's linker is a gold linker.
This commit could also potentially fix a known issue in our FindUrho3D.cmake module where we have to hardcode the library dependencies that libUrho3D.so in turn depends on (to be investigated later).
2016-08-05 18:41:52 +08:00
Yao Wei Tjong 姚伟忠 c4a92e97b0 Adapt the 'legacy' Android toolchain file to support Android NDK r12b.
This will be the last time we modify this toolchain file for Urho3D project. We are forced to touch it one last time because we need to bump the NDK version in urho3d/android-ndk repository.
2016-07-18 22:01:10 +08:00
Yao Wei Tjong 姚伟忠 3ab69da3af Use __ANDROID__ compiler define consistently. 2016-06-10 20:28:07 +08:00
Yao Wei Tjong 姚伟忠 ff64de61be Initial support for Linux on generic ARM cross-compiling.
Close #1384.
2016-06-10 19:14:34 +08:00
Yao Wei Tjong 姚伟忠 bfa62a0575 Enhance Android/CMake toolchain file to support NDK r11 new layout. 2016-06-10 17:17:21 +08:00
Yao Wei Tjong 姚伟忠 bdd9b5f7fc Update CMake/Android toolchain file to support NDK r11c.
[ci only: Android] [skip appveyor]
2016-05-04 22:34:12 +08:00
Yao Wei Tjong 姚伟忠 929d8acbae Misc. bug fixes and refactoring in configuring SDL library build.
- Fix the regex to get the shared library soname correctly.
- Use the GCC_ATOMIC and CLOCK_GETTIME whenever they are available.
- Reorganize the if-else block in the SDL CMakeLists.txt to prevent Unix-like platforms (e.g. Android) from entering the block meant for genuine Unix/Linux.
- and more.
2016-03-30 07:15:20 +08:00
Yao Wei Tjong 姚伟忠 d4fb578645 Misc. bug fixes on the new FindDirectX.cmake module.
The module does not use any of the internal Urho3D CMake variables now, so in theory it could be used for other projects too.
Close #1261. Close #1254.
2016-03-19 19:31:33 +08:00
Yao Wei Tjong 姚伟忠 06bcfbeb7b Fix all the cross-compiling builds due to bugs in SDL CMakeLists.txt.
Fix SDL library build on Web platform.
2016-03-16 01:45:08 +08:00
Yao Wei Tjong 姚伟忠 71efb146cb Refactor the CPU instruction extensions detection mechanism.
Fix SDL build on the latest Raspbian Jessie release.
2016-03-16 01:45:08 +08:00
Yao Wei Tjong 姚伟忠 ccf6648eb3 Utilize new SDLActivity's get arguments feature. 2016-03-16 01:42:01 +08:00
urho3d-travis-ci c4f6f315ff Travis CI: bump copyright to 2016.
[ccache clear]
2016-01-26 13:55:03 +00:00
Yao Wei Tjong 姚伟忠 1066c52fb6 Fix build system to find 32-bit packages correctly on Linux. 2016-01-22 12:01:23 +08:00
Yao Wei Tjong 姚伟忠 431559c2bd For Travis CI & AppVeyor - unified 'ci' rake task and spring cleaning. 2016-01-06 16:38:58 +08:00
Yao Wei Tjong 姚伟忠 ed28d2b24f Attempt to fix Android build with PCH enabled targeting API >= 16.
Fix #1100.
[skip appveyor] [ci only: Android, OSX, Emscripten]
2015-12-19 17:37:07 +08:00
Yao Wei Tjong 姚伟忠 a3e0072e79 Suppress policy CMP0054 dev warnings on Android build.
Enhance android rake task to have additional option to install the APK before testing it.
[ci only: Android]
2015-09-06 13:05:30 +08:00
Yao Wei Tjong 姚伟忠 86194164b5 Avoid name clash with EMSCRIPTEN environment variable. Close #871.
[ci only: Emscripten]
2015-09-03 13:41:31 +08:00
Yao Wei Tjong 姚伟忠 ae59d55580 Fix Emscripten toolchain file for determining EMCC version in Windows. 2015-05-30 00:42:57 +08:00
Yao Wei Tjong 姚伟忠 bee87b25a9 Minor code comment. Test [ci package] [ci only: Emscripten]. 2015-05-22 21:45:23 +08:00
Yao Wei Tjong 姚伟忠 0627d83f3a For Travis CI - attempt to migrate Emscripten CI build to new infra.
[ci only: Emscripten]
2015-05-22 18:51:07 +08:00
Yao Wei Tjong 姚伟忠 5d3aa98b3b Merge upstream change on Android/CMake toolchain. Add NDK r10e support.
[ci only: Android]
2015-05-20 14:32:06 +08:00
Yao Wei Tjong 姚伟忠 98863e183a Code clean up to remove temporary workaround for Emscripten. 2015-04-26 16:20:29 +08:00
Yao Wei Tjong 姚伟忠 cf68e3900e Use CMake construct instead of '|grep' to determine emcc version.
So that, the detection logic works on Windows host system too.
2015-04-26 11:54:32 +08:00
Yao Wei Tjong 姚伟忠 f9060b7831 Only perform ccache configuration during initial project configuration.
Determine the Emscripten's emcc version and use it to determine whether ccache could be enabled without caveat.
The changes for adding new '--use-metadata' option for Emscripten' file-packager.py has just been submitted to Emscripten upstream as PR (https://github.com/kripken/emscripten/pull/3410) today. Not sure how long it will take to be reviewed and merged (if at all). Tentatively assume it will be in incoming 1.31.4. With the immutable jsoutput file, the linker does not retriggered unnecessarily after changing the resource dirs content.
2015-04-25 21:42:31 +08:00