From 610d7b814b11ed1e9e7b3ba0e7ebd1f7837e9135 Mon Sep 17 00:00:00 2001 From: Alex Chi Date: Tue, 6 Nov 2018 01:52:57 +0800 Subject: [PATCH] support vs2017 --- .gitlab-ci.yml | 53 ++++++++++++++++++++++----------- CMakeLists.txt | 4 +-- include/libgltf/libgltf.h | 2 +- source/runtest/CMakeLists.txt | 2 +- tools/batch/glTF_2.0_schema.ini | 2 +- 5 files changed, 40 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 04eb20e..80291be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: @@ -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 ../../' @@ -81,7 +100,7 @@ compile_linux: - valgrind - gcovr -compile_macos: +compile.macos: stage: build script: - 'cd tools/batch/ && ./update_parser_by_scheme.sh && cd ../../' @@ -99,7 +118,7 @@ compile_macos: - make - gcc -compile_android: +compile.android: stage: build script: - 'cd tools/batch/ && ./update_parser_by_scheme.sh && cd ../../' @@ -132,7 +151,7 @@ compile_android: - cmake - ninja -compile_ios: +compile.ios: stage: build script: - 'cd tools/batch/ && ./update_parser_by_scheme.sh && cd ../../' diff --git a/CMakeLists.txt b/CMakeLists.txt index 42dce1c..5427974 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/include/libgltf/libgltf.h b/include/libgltf/libgltf.h index db84557..45d6656 100644 --- a/include/libgltf/libgltf.h +++ b/include/libgltf/libgltf.h @@ -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) diff --git a/source/runtest/CMakeLists.txt b/source/runtest/CMakeLists.txt index a2d476b..30307f9 100644 --- a/source/runtest/CMakeLists.txt +++ b/source/runtest/CMakeLists.txt @@ -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} diff --git a/tools/batch/glTF_2.0_schema.ini b/tools/batch/glTF_2.0_schema.ini index 547217b..aba9270 100644 --- a/tools/batch/glTF_2.0_schema.ini +++ b/tools/batch/glTF_2.0_schema.ini @@ -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