ソースを参照

For Travis-CI - reduce number of samples in Emscripten build.
Also remove CI build for shared lib type. It is anyway just an emulation as Emscripten does not support dynamic library (yet) and our earlier issue with emar for static lib type has been fully resolved. Test [ci package] for Emscripten.

Yao Wei Tjong 姚伟忠 11 年 前
コミット
24e70ecd60

+ 1 - 2
.travis.yml

@@ -28,7 +28,6 @@ env:
     - NUMJOBS=3
   matrix:
     - URHO3D_LIB_TYPE=STATIC
-    - URHO3D_LIB_TYPE=SHARED
 matrix:
   fast_finish: true
 before_install:
@@ -39,7 +38,7 @@ before_install:
   - pushd /usr/bin && sudo ln -sf python python2 && popd
 install:
   - if [ $PACKAGE_UPLOAD ]; then travis_retry brew update >/dev/null && travis_retry brew install doxygen graphviz; fi
-  - wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz && tar xfz emsdk-portable.tar.gz && rm emsdk-portable.tar.gz && cd emsdk_portable && ./emsdk update >/dev/null && ./emsdk install latest >/dev/null && ./emsdk activate latest >/dev/null && source ./emsdk_env.sh && export EMSCRIPTEN_ROOT_PATH=$EMSCRIPTEN && export EMSCRIPTEN=1
+  - wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz && tar xfz emsdk-portable.tar.gz && rm emsdk-portable.tar.gz && cd emsdk_portable && dummy=`./emsdk update && ./emsdk install latest && ./emsdk activate latest` && source ./emsdk_env.sh && export EMSCRIPTEN_ROOT_PATH=$EMSCRIPTEN && export EMSCRIPTEN=1
 script: rake ci
 after_success: if [ $PACKAGE_UPLOAD ]; then rake ci_package_upload; fi
 

+ 0 - 2
CMake/Modules/Urho3D-CMake-common.cmake

@@ -388,8 +388,6 @@ else ()
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-warn-absolute-paths -Wno-unknown-warning-option")
             # CMake does not treat Emscripten as a valid platform yet, certain platform-specific variables cannot be set in the
             # toolchain file as they get overwritten by CMake internally as per Linux platform default, so set them here for now
-            set (CMAKE_SHARED_LIBRARY_SUFFIX .bc)   # .bc instead of .so but leave the static archive as .a
-            string (REPLACE .so .bc CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")   # Stringify for string replacement
             set (CMAKE_EXECUTABLE_SUFFIX .html)
         elseif (MINGW)
             # MinGW-specific setup

+ 1 - 1
Source/CMakeLists.txt

@@ -28,7 +28,7 @@ if (HAVE_STDINT_H)
 endif ()
 
 # Setup RPATH settings
-if (URHO3D_LIB_TYPE STREQUAL SHARED AND NOT WIN32 AND NOT ANDROID AND NOT IOS)
+if (URHO3D_LIB_TYPE STREQUAL SHARED AND NOT WIN32 AND NOT ANDROID AND NOT IOS AND NOT EMSCRIPTEN)
     # Add RPATH entries when building
     set (CMAKE_SKIP_BUILD_RPATH FALSE)
     # But don't set them yet in the build tree

+ 3 - 0
Source/Extras/CMakeLists.txt

@@ -27,5 +27,8 @@ project (Urho3D-Extras)
 find_package (Urho3D REQUIRED)
 include_directories (${URHO3D_INCLUDE_DIRS})
 
+# All tools must be natively built and output to bin/tool subdir to differentiate them from platform-specific binaries in the bin directory
+set_output_directories (${CMAKE_BINARY_DIR}/bin/tool RUNTIME PDB)
+
 # Urho3D extras
 add_subdirectory (OgreBatchConverter)

+ 17 - 14
Source/Samples/CMakeLists.txt

@@ -34,11 +34,23 @@ set (COMMON_SAMPLE_H_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Sample.h" "${CMAKE_CURRE
 set (INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
 
 # Add samples
-add_subdirectory (01_HelloWorld)
-add_subdirectory (02_HelloGUI)
-add_subdirectory (03_Sprites)
-add_subdirectory (04_StaticScene)
-add_subdirectory (05_AnimatingScene)
+if (NOT DEFINED ENV{CI} OR NOT EMSCRIPTEN)
+    # Below samples are excluded from Emscripten CI build due to build time constraint, they are included in a normal (non-CI) Emscripten build
+    add_subdirectory (01_HelloWorld)
+    add_subdirectory (02_HelloGUI)
+    add_subdirectory (03_Sprites)
+    add_subdirectory (04_StaticScene)
+    add_subdirectory (05_AnimatingScene)
+    add_subdirectory (14_SoundEffects)
+    add_subdirectory (26_ConsoleInput)
+    add_subdirectory (29_SoundSynthesis)
+    add_subdirectory (30_LightAnimation)
+    add_subdirectory (31_MaterialAnimation)
+    add_subdirectory (34_DynamicGeometry)
+    add_subdirectory (35_SignedDistanceFieldText)
+    add_subdirectory (37_UIDrag)
+    add_subdirectory (38_SceneAndUILoad)
+endif ()
 add_subdirectory (06_SkeletalAnimation)
 add_subdirectory (07_Billboards)
 add_subdirectory (08_Decals)
@@ -49,7 +61,6 @@ if (URHO3D_PHYSICS)
     add_subdirectory (12_PhysicsStressTest)
     add_subdirectory (13_Ragdolls)
 endif ()
-add_subdirectory (14_SoundEffects)
 if (URHO3D_NAVIGATION)
     add_subdirectory (15_Navigation)
 endif ()
@@ -78,11 +89,3 @@ if (URHO3D_URHO2D)
     add_subdirectory (33_Urho2DSpriterAnimation)
     add_subdirectory (36_Urho2DTileMap)
 endif ()
-add_subdirectory (26_ConsoleInput)
-add_subdirectory (29_SoundSynthesis)
-add_subdirectory (30_LightAnimation)
-add_subdirectory (31_MaterialAnimation)
-add_subdirectory (34_DynamicGeometry)
-add_subdirectory (35_SignedDistanceFieldText)
-add_subdirectory (37_UIDrag)
-add_subdirectory (38_SceneAndUILoad)