Skip to content

Commit

Permalink
support vs2017
Browse files Browse the repository at this point in the history
  • Loading branch information
alexchicn committed Nov 5, 2018
1 parent 55e6200 commit 610d7b8
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 23 deletions.
53 changes: 36 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,45 @@ checked_by_cppcheck:
- python
- cppcheck

compile_windows:
compile.windows:
stage: build
script:
- 'cd tools/batch/ && python .\..\..\tools\jsonschematoc11 glTF_2.0_schema.ini && cd ../../'
- 'call "%VS140COMNTOOLS%VsDevCmd.bat"'
- 'if exist build rmdir /s /q build'
- 'if exist output rmdir /s /q output'
- 'mkdir build && cd build'
- 'mkdir vs2017 && cd vs2017'
- 'call "%VS2017COMNTOOLS%VsDevCmd.bat"'
- 'mkdir win32 && cd win32'
- 'cmake -G "Visual Studio 15 2017" -DLIBGLTF_WITH_UNICODE=TRUE -DCUSTOM_OUT_PATH="%CD%\output" ../../../'
- 'msbuild libgltf.sln /t:Build /p:Configuration="Debug" /p:Platform="Win32"'
- 'output\bin\win32\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-BarramundiFish.gltf'
- 'output\bin\win32\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-Draco-BarramundiFish.gltf'
- 'output\bin\win32\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-pbrSpecularGlossinessBarramundiFish.gltf'
- 'cd ../'
- 'mkdir win64 && cd win64'
- 'cmake -G "Visual Studio 15 2017 Win64" -DLIBGLTF_WITH_UNICODE=TRUE -DCUSTOM_OUT_PATH="%CD%\output" ../../../'
- 'msbuild libgltf.sln /t:Build /p:Configuration="Debug" /p:Platform="x64"'
- 'output\bin\win64\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-BarramundiFish.gltf'
- 'output\bin\win64\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-Draco-BarramundiFish.gltf'
- 'output\bin\win64\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-pbrSpecularGlossinessBarramundiFish.gltf'
- 'cd ../'
- 'cd ../'
- 'mkdir vs2015 && cd vs2015'
- 'call "%VS140COMNTOOLS%VsDevCmd.bat"'
- 'mkdir win32 && cd win32'
- 'cmake -G "Visual Studio 14 2015" -DLIBGLTF_WITH_UNICODE=TRUE ../../'
- 'msbuild libgltf.sln /t:Rebuild /p:Configuration="Debug" /p:Platform="Win32"'
- '..\..\output\bin\win32\Debug\runtest.exe ..\..\resource\example-2.0\glTF-BarramundiFish.gltf'
- '..\..\output\bin\win32\Debug\runtest.exe ..\..\resource\example-2.0\glTF-Draco-BarramundiFish.gltf'
- '..\..\output\bin\win32\Debug\runtest.exe ..\..\resource\example-2.0\glTF-pbrSpecularGlossinessBarramundiFish.gltf'
- 'cmake -G "Visual Studio 14 2015" -DLIBGLTF_WITH_UNICODE=TRUE -DCUSTOM_OUT_PATH="%CD%\output" ../../../'
- 'msbuild libgltf.sln /t:Build /p:Configuration="Debug" /p:Platform="Win32"'
- 'output\bin\win32\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-BarramundiFish.gltf'
- 'output\bin\win32\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-Draco-BarramundiFish.gltf'
- 'output\bin\win32\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-pbrSpecularGlossinessBarramundiFish.gltf'
- 'cd ../'
- 'mkdir win64 && cd win64'
- 'cmake -G "Visual Studio 14 2015 Win64" -DLIBGLTF_WITH_UNICODE=TRUE ../../'
- 'msbuild libgltf.sln /t:Rebuild /p:Configuration="Debug" /p:Platform="x64"'
- '..\..\output\bin\win64\Debug\runtest.exe ..\..\resource\example-2.0\glTF-BarramundiFish.gltf'
- '..\..\output\bin\win64\Debug\runtest.exe ..\..\resource\example-2.0\glTF-Draco-BarramundiFish.gltf'
- '..\..\output\bin\win64\Debug\runtest.exe ..\..\resource\example-2.0\glTF-pbrSpecularGlossinessBarramundiFish.gltf'
- 'cmake -G "Visual Studio 14 2015 Win64" -DLIBGLTF_WITH_UNICODE=TRUE -DCUSTOM_OUT_PATH="%CD%\output" ../../../'
- 'msbuild libgltf.sln /t:Build /p:Configuration="Debug" /p:Platform="x64"'
- 'output\bin\win64\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-BarramundiFish.gltf'
- 'output\bin\win64\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-Draco-BarramundiFish.gltf'
- 'output\bin\win64\Debug\runtest.exe ..\..\..\resource\example-2.0\glTF-pbrSpecularGlossinessBarramundiFish.gltf'
- 'cd ../'
- 'cd ../'
- 'cd ../'
tags:
Expand All @@ -52,8 +70,9 @@ compile_windows:
- python
- cmake
- vs2015
- vs2017

compile_linux:
compile.linux:
stage: build
script:
- 'cd tools/batch/ && ./update_parser_by_scheme.sh && cd ../../'
Expand Down Expand Up @@ -81,7 +100,7 @@ compile_linux:
- valgrind
- gcovr

compile_macos:
compile.macos:
stage: build
script:
- 'cd tools/batch/ && ./update_parser_by_scheme.sh && cd ../../'
Expand All @@ -99,7 +118,7 @@ compile_macos:
- make
- gcc

compile_android:
compile.android:
stage: build
script:
- 'cd tools/batch/ && ./update_parser_by_scheme.sh && cd ../../'
Expand Down Expand Up @@ -132,7 +151,7 @@ compile_android:
- cmake
- ninja

compile_ios:
compile.ios:
stage: build
script:
- 'cd tools/batch/ && ./update_parser_by_scheme.sh && cd ../../'
Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ else()
set(OUT_PATH ${CUSTOM_OUT_PATH})
endif()
set(OUT_BIN_PATH "${OUT_PATH}/bin/${PLATFORM_NAME}")
set(OUT_LIB_PATH "${ROOT_PATH}/output/lib/${PLATFORM_NAME}")
set(INTERNAL_OUT_PATH "${ROOT_PATH}/output")
set(INTERNAL_BIN_PATH "${INTERNAL_OUT_PATH}/bin/${PLATFORM_NAME}")
set(OUT_LIB_PATH "${OUT_PATH}/lib/${PLATFORM_NAME}")

if((CMAKE_COMPILER_IS_GNUCC STREQUAL "1") OR (CMAKE_COMPILER_IS_GNUCXX STREQUAL "1"))
add_definitions(-DCOMPILER_IS_GCC)
Expand Down
2 changes: 1 addition & 1 deletion include/libgltf/libgltf.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#define LIBGLTF_MAJOR_VERSION 0
#define LIBGLTF_MINOR_VERSION 1
#define LIBGLTF_PATCH_VERSION 4
#define LIBGLTF_PATCH_VERSION 5

#if defined(UNICODE)
#if defined(USING_CHAR16)
Expand Down
2 changes: 1 addition & 1 deletion source/runtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ elseif(${LIBGLTF_PLATFORM_LINUX} OR ${LIBGLTF_PLATFORM_MACOS})
endif()
link_libraries(${LIBRARY_PATH_LIST})

set(EXECUTABLE_OUTPUT_PATH ${INTERNAL_BIN_PATH})
set(EXECUTABLE_OUTPUT_PATH ${OUT_BIN_PATH})

add_executable(runtest
${HEADER_FILE_LIST}
Expand Down
2 changes: 1 addition & 1 deletion tools/batch/glTF_2.0_schema.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extensions_schema_directories=
%(CD)s/../../external/glTF/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/schema
major_version=0
minor_version=1
patch_version=4
patch_version=5

[code.headers]
extension.schema.json=%(CD)s/codes/extension.schema.json.h
Expand Down

0 comments on commit 610d7b8

Please sign in to comment.