mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-13 22:22:05 +00:00
Fixed -DUSE_SYSTEM_ZLIB=ON close #913
This commit is contained in:
parent
eaeb8336ea
commit
70846d66ad
4 changed files with 15 additions and 9 deletions
|
@ -46,7 +46,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "../zlib.h"
|
||||
#include <zlib.h>
|
||||
|
||||
#if defined(USE_FILE32API)
|
||||
#define fopen64 fopen
|
||||
|
|
|
@ -51,7 +51,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef _ZLIB_H
|
||||
#include "../zlib.h"
|
||||
#include "zlib.h"
|
||||
#endif
|
||||
|
||||
#include "ioapi.h"
|
||||
|
|
|
@ -47,7 +47,7 @@ extern "C" {
|
|||
//#define HAVE_BZIP2
|
||||
|
||||
#ifndef _ZLIB_H
|
||||
#include "../zlib.h"
|
||||
#include "zlib.h"
|
||||
#endif
|
||||
|
||||
#ifndef _ZLIBIOAPI_H
|
||||
|
|
|
@ -119,12 +119,18 @@ file(GLOB MC_IMTUI_SOURCES ../../libs/imtui/*.cpp)
|
|||
file(GLOB MC_IMGUI_INCLUDES ../../libs/imtui/imgui/*.h)
|
||||
file(GLOB MC_IMGUI_SOURCES ../../libs/imtui/imgui/*.cpp)
|
||||
|
||||
if (NOT ZLIB_FOUND)
|
||||
file(GLOB MC_ZLIB_INCLUDES ../../libs/zlib/*.h)
|
||||
file(GLOB MC_ZLIB_SOURCES ../../libs/zlib/*.c)
|
||||
else()
|
||||
if(ZLIB_FOUND)
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
set(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
|
||||
|
||||
set(MC_ZLIB_INCLUDES "")
|
||||
set(MC_ZLIB_SOURCES "")
|
||||
else()
|
||||
include_directories("libs/zlib")
|
||||
set(ZLIB_LIBRARY "" )
|
||||
|
||||
file(GLOB MC_ZLIB_INCLUDES ../../libs/zlib/*.h)
|
||||
file(GLOB MC_ZLIB_SOURCES ../../libs/zlib/*.c)
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -264,7 +270,7 @@ if(MSVC)
|
|||
|
||||
add_executable(rbdmap ${MC_SOURCES_ALL} ${MC_INCLUDES_ALL})
|
||||
add_dependencies(rbdmap idlib)
|
||||
target_link_libraries(rbdmap idlib winmm imtui-pdcurses)
|
||||
target_link_libraries(rbdmap idlib winmm imtui-pdcurses ${ZLIB_LIBRARY})
|
||||
|
||||
# set MSVC default debug directory on executable
|
||||
if(CMAKE_MAJOR_VERSION EQUAL 3 AND CMAKE_MINOR_VERSION GREATER_EQUAL 8)
|
||||
|
@ -313,7 +319,7 @@ else()
|
|||
if (USE_PRECOMPILED_HEADERS)
|
||||
add_dependencies(rbdmap precomp_header_rbdmap)
|
||||
endif()
|
||||
target_link_libraries(rbdmap idlib ${CURSES_NCURSES_LIBRARY})
|
||||
target_link_libraries(rbdmap idlib ${CURSES_NCURSES_LIBRARY} ${ZLIB_LIBRARY})
|
||||
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue