From 8a6a4b058618249384269a031f9e77be39ba4c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 10 Mar 2020 16:52:38 +0100 Subject: [PATCH] Make tev buildable on Windows using Ninja --- dependencies/CMakeLists.txt | 2 +- scripts/create-exe-ninja.bat | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 scripts/create-exe-ninja.bat diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index d9fa9717..d065ef74 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -32,7 +32,7 @@ if (WIN32) set_property(TARGET zlibstatic PROPERTY FOLDER "dependencies") set(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib" CACHE PATH " " FORCE) - set(ZLIB_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/zlib/$/zlibstatic.lib" CACHE FILEPATH " " FORCE) + set(ZLIB_LIBRARY zlibstatic) include_directories(${ZLIB_INCLUDE_DIR} "${CMAKE_CURRENT_BINARY_DIR}/zlib") endif() diff --git a/scripts/create-exe-ninja.bat b/scripts/create-exe-ninja.bat new file mode 100644 index 00000000..1d483c45 --- /dev/null +++ b/scripts/create-exe-ninja.bat @@ -0,0 +1,21 @@ +@echo off + +set cwd=%cd% +cd /D %~dp0 + +set DevCmd="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" +set BuildDir64="build-exe-64" + +call %DevCmd% + +echo Building tev with ninja... +mkdir %BuildDir64% +cd %BuildDir64% +cmake -DTEV_DEPLOY=1 -DCMAKE_BUILD_TYPE=Release -GNinja ..\.. +ninja +move "tev.exe" "..\..\tev.exe" +cd .. + +echo Returning to original directory. +cd /D %cwd% +pause