diff options
author | Andriy Byzhynar (GitHub) <AByzhynar@luxoft.com> | 2016-10-06 09:35:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-06 09:35:22 +0300 |
commit | ab5b37583b12c4f363525be93ca7a9a833b25274 (patch) | |
tree | 20299f07fe81f622022745e42af06fd85376529e | |
parent | 91c67e98eb3513adc14bd410f20550c225494bc8 (diff) | |
parent | 395a533ee746113f0ecee2f645964f8abaf9e289 (diff) | |
download | sdl_core-archive/develop_20160928.tar.gz |
Merge pull request #833 from antongovorov/feature/DisableOpenSSLLibUsbRebuildarchive/develop_20160928
Remove OpenSSL & libusb builds from sources during every SDL build TeamCity
-rw-r--r-- | tools/cmake/modules/FindSDLLibUSB.cmake | 10 | ||||
-rw-r--r-- | tools/cmake/modules/FindSDLOpenSSL.cmake | 12 | ||||
-rw-r--r-- | tools/ms/libusbx_setup.cmd | 10 | ||||
-rw-r--r-- | tools/ms/openssl_setup.cmd | 10 |
4 files changed, 22 insertions, 20 deletions
diff --git a/tools/cmake/modules/FindSDLLibUSB.cmake b/tools/cmake/modules/FindSDLLibUSB.cmake index 0082d62315..e6f181a5d0 100644 --- a/tools/cmake/modules/FindSDLLibUSB.cmake +++ b/tools/cmake/modules/FindSDLLibUSB.cmake @@ -9,11 +9,11 @@ if(${OS} STREQUAL "posix") set(LIBUSB_LIBRARIES usb-1.0 udev) elseif(${OS} STREQUAL "win") get_arch(ARCH) - if(${ARCH} STREQUAL "x86") - set(LIBUSB_DIR ${CMAKE_SOURCE_DIR}/build/libusbx_win_x86) - elseif(${ARCH} STREQUAL "x64") - set(LIBUSB_DIR ${CMAKE_SOURCE_DIR}/build/libusbx_win_x64) - endif() + if(${ARCH} STREQUAL "x86") + set(LIBUSB_DIR $ENV{SDL_LIBUSB_DIR}/libusbx_win_x86) + elseif(${ARCH} STREQUAL "x64") + set(LIBUSB_DIR $ENV{SDL_LIBUSB_DIR}/libusbx_win_x64) + endif() set(LIBUSB_INCLUDE_DIRECTORY ${LIBUSB_DIR}/libusb) set(LIBUSB_LIBRARIES ${LIBUSB_DIR}/bin/libusb-1.0.lib) endif() diff --git a/tools/cmake/modules/FindSDLOpenSSL.cmake b/tools/cmake/modules/FindSDLOpenSSL.cmake index c16236a1cb..616a01847f 100644 --- a/tools/cmake/modules/FindSDLOpenSSL.cmake +++ b/tools/cmake/modules/FindSDLOpenSSL.cmake @@ -1,4 +1,3 @@ -# - Try to find OpenSSL # # OPENSSL_INCLUDE_DIRECTORY - the OpenSSL include directory # OPENSSL_LIBRARIES - the OpenSSL libraries @@ -8,11 +7,12 @@ if(${OS} STREQUAL "posix") find_package(OpenSSL REQUIRED) elseif(${OS} STREQUAL "win") get_arch(ARCH) - if(${ARCH} STREQUAL "x86") - set(OPENSSL_DIR ${CMAKE_SOURCE_DIR}/build/openssl_win_x86) - elseif(${ARCH} STREQUAL "x64") - set(OPENSSL_DIR ${CMAKE_SOURCE_DIR}/build/openssl_win_x64) - endif() + if(${ARCH} STREQUAL "x86") + set(OPENSSL_DIR $ENV{SDL_OPENSSL_DIR}/openssl_win_x86) + elseif(${ARCH} STREQUAL "x64") + set(OPENSSL_DIR $ENV{SDL_OPENSSL_DIR}/openssl_win_x64) + endif() set(OPENSSL_INCLUDE_DIRECTORY ${OPENSSL_DIR}/include) set(OPENSSL_LIBRARIES ${OPENSSL_DIR}/lib/libeay32.lib ${OPENSSL_DIR}/lib/ssleay32.lib) + endif() diff --git a/tools/ms/libusbx_setup.cmd b/tools/ms/libusbx_setup.cmd index 04d28f1c2e..fb836572c3 100644 --- a/tools/ms/libusbx_setup.cmd +++ b/tools/ms/libusbx_setup.cmd @@ -2,12 +2,13 @@ setlocal EnableDelayedExpansion if [%1]==[] goto usage - +set BUILD_TYPE=%1 +if exist "%SDL_LIBUSB_DIR%\libusbx_win_%BUILD_TYPE%" goto msg set BUILD_TYPE=%1 set LIBS_DIR="%SDL_ROOT_DIR%\src\3rd_party-static" set LIBUSBX_SRC_DIR_NAME=libusbx-1.0.17 set LIBUSBX_SRC_DIR=%LIBS_DIR%\%LIBUSBX_SRC_DIR_NAME% -set LIBUSBX_BUILD_DIR=%SDL_BUILD_DIR%\libusbx_win_%BUILD_TYPE% +set LIBUSBX_BUILD_DIR=%SDL_LIBUSB_DIR%\libusbx_win_%BUILD_TYPE% if not exist %LIBUSBX_SRC_DIR% ( pushd %LIBS_DIR% @@ -36,10 +37,11 @@ if not exist %LIBUSBX_BUILD_DIR% ( xcopy %LIBUSBX_SRC_DIR%\libusb %LIBUSBX_BUILD_DIR%\libusb /E /I /H /R /Y ) - +setx SDL_LIBUSB_DIR %LIBUSB_BUILD_DIR% goto end :usage @echo "Usage: <script> [x86|x64]" - +:msg +@echo "LibUSB already exists" :end diff --git a/tools/ms/openssl_setup.cmd b/tools/ms/openssl_setup.cmd index ddc6075fe7..ed9a6fe2c3 100644 --- a/tools/ms/openssl_setup.cmd +++ b/tools/ms/openssl_setup.cmd @@ -1,13 +1,12 @@ @echo off setlocal EnableDelayedExpansion - if [%1]==[] goto usage - set BUILD_TYPE=%1 +if exist "%SDL_OPENSSL_DIR%\openssl_win_%BUILD_TYPE%" goto msg set LIBS_DIR="%SDL_ROOT_DIR%\src\3rd_party-static" set OPENSSL_SRC_DIR_NAME=openssl-1.0.2 set OPENSSL_SRC_DIR=%LIBS_DIR%\%OPENSSL_SRC_DIR_NAME% -set OPENSSL_BUILD_DIR=%SDL_BUILD_DIR%\openssl_win_%BUILD_TYPE% +set OPENSSL_BUILD_DIR=%SDL_OPENSSL_DIR%\openssl_win_%BUILD_TYPE% if not exist %OPENSSL_SRC_DIR% ( pushd %LIBS_DIR% @@ -44,10 +43,11 @@ rem The following commit is stable nmake -f ms\nt.mak install popd ) - +setx SDL_OPENSSL_DIR %OPENSSL_BUILD_DIR% goto end :usage @echo "Usage: <script> [x86|x64]" - +:msg +@echo "OpenSSL already exists" :end |