Make sure that we are not using files from our zlib/libpng when STK is compiled with shared libraries.
It's possible that STK was using these files for compilation when cmake was run from main directory. In this case compiled files are stored in stk-code/lib, so that CMAKE_CURRENT_BINARY_DIR is stk-code/lib/irrlicht rather than stk-code/build/lib/irrlicht and we include whole lib/libpng rather than non-existing directory.
This commit is contained in:
parent
8653d410f8
commit
1fd6a8aa86
@ -98,7 +98,7 @@ if(NOT USE_GLES2 AND NOT SERVER_ONLY)
|
||||
include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
|
||||
endif()
|
||||
|
||||
if((WIN32 AND NOT MINGW) OR APPLE)
|
||||
if(MSVC OR APPLE)
|
||||
if (NOT APPLE)
|
||||
# Build zlib library
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/zlib")
|
||||
|
@ -5,9 +5,13 @@ find_package(JPEG REQUIRED)
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/"
|
||||
"${JPEG_INCLUDE_DIR}"
|
||||
"${PNG_INCLUDE_DIRS}"
|
||||
"${ZLIB_INCLUDE_DIR}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../zlib/" # For zconf.h on WIN32
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../libpng/")
|
||||
"${ZLIB_INCLUDE_DIR}")
|
||||
|
||||
if(MSVC OR APPLE)
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/../zlib/" # For zconf.h on WIN32
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/../libpng/")
|
||||
endif()
|
||||
|
||||
if (SERVER_ONLY)
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_OPENGL_)
|
||||
add_definitions(-DNO_IRR_COMPILE_WITH_X11_)
|
||||
|
Loading…
x
Reference in New Issue
Block a user