Skip to content

Commit

Permalink
Fix external dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
florianbecker committed Nov 14, 2024
1 parent a81b891 commit 61df46a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmake/external/icu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ else()
set(ICU_ARCH 64)
endif()
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(ICU_I18N_LIBRARY ${ICU_SRC}/src/ICU/lib${ICU_ARCH}/icuind.lib)
set(ICU_UC_LIBRARY ${ICU_SRC}/src/ICU/lib${ICU_ARCH}/icuucd.lib)
set(ICU_I18N_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuin76d.dll)
Expand Down
40 changes: 27 additions & 13 deletions cmake/external/zlib.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
#
# Copyright (C) 09/07/2022 VX APPS <[email protected]>
# Copyright (c) 2022 Florian Becker <[email protected]> (VX APPS).
# All rights reserved.
#
# This document is property of VX APPS. It is strictly prohibited
# to modify, sell or publish it in any way. In case you have access
# to this document, you are obligated to ensure its nondisclosure.
# Noncompliances will be prosecuted.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Diese Datei ist Eigentum der VX APPS. Jegliche Änderung, Verkauf
# oder andere Verbreitung und Veröffentlichung ist strikt untersagt.
# Falls Sie Zugang zu dieser Datei haben, sind Sie verpflichtet,
# alles in Ihrer Macht stehende für deren Geheimhaltung zu tun.
# Zuwiderhandlungen werden strafrechtlich verfolgt.
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

include(ExternalProject)
Expand All @@ -19,14 +34,14 @@ set(ZLIB_SRC ${CMAKE_BINARY_DIR}/_deps/zlib-src)
set(ZLIB_INSTALL ${CMAKE_BINARY_DIR}/_deps/zlib-install)
if(UNIX)
set(ZLIB_LIBRARY ${ZLIB_INSTALL}/lib/libz.a)
set(ZLIB_OS_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE})
else()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(ZLIB_LIBRARY ${ZLIB_INSTALL}/lib/zlibstaticd.lib)
else()
set(ZLIB_LIBRARY ${ZLIB_INSTALL}/lib/zlibstatic.lib)
endif()
endif()
set(ZLIB_OS_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE})
set(ZLIB_INCLUDE_DIR ${ZLIB_INSTALL}/include)

ExternalProject_Add(ZLIB
Expand All @@ -44,7 +59,6 @@ ExternalProject_Add(ZLIB
INSTALL_DIR ${ZLIB_INSTALL}
BUILD_BYPRODUCTS ${ZLIB_LIBRARY}
UPDATE_COMMAND ""
PATCH_COMMAND patch -t < ${CMAKE_SOURCE_DIR}/cmake/patches/zlib.patch
)

# We cannot use find_library because ExternalProject_Add() is performed at build time.
Expand Down

0 comments on commit 61df46a

Please sign in to comment.