Fixed windows compilation

This commit is contained in:
Deve 2017-06-05 21:54:44 +02:00
parent ccf3893abb
commit 15ce5b4ebf
2 changed files with 7 additions and 7 deletions

View File

@ -113,15 +113,15 @@ if((WIN32 AND NOT MINGW) OR APPLE)
endif()
# Build png library
set (SKIP_INSTALL_ALL TRUE)
set (PNG_STATIC TRUE)
set (PNG_TESTS FALSE)
set (PNG_SHARED FALSE)
set(SKIP_INSTALL_ALL TRUE)
set(PNG_STATIC TRUE CACHE BOOL "Build static lib")
set(PNG_TESTS FALSE CACHE BOOL "Build libpng tests")
set(PNG_SHARED FALSE CACHE BOOL "Build shared lib")
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libpng")
include_directories("${PROJECT_SOURCE_DIR}/lib/libpng")
set(PNG_PNG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/libpng/")
set(PNG_LIBRARY png15_static)
set(PNG_LIBRARY png_static)
endif()
# Add jpeg library

View File

@ -6,8 +6,8 @@ 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}/../zlib/" # For zconf.h on WIN32
"${CMAKE_CURRENT_BINARY_DIR}/../libpng/")
if (SERVER_ONLY)
add_definitions(-DNO_IRR_COMPILE_WITH_OPENGL_)
add_definitions(-DNO_IRR_COMPILE_WITH_X11_)