Fixed cmake on VS (before cmake create would fail, but redoing the configure

and then generating the project would still work, so with an existing
project this error was not detected).
This commit is contained in:
hiker 2015-03-11 14:45:25 +11:00
parent 886c0e3e9f
commit 55934bd8f1

View File

@ -43,9 +43,14 @@ if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
endif()
# needed packages
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
# Needed packages. Since WIN32 (except mingw) uses the included zlib
# version, find_package would fail with an error message. Since
# all variables are already set in this case, the find package
# is actually not necessary in this case, so just ignore it
if(NOT WIN32 OR MINGW)
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
endif()
if(NOT WIN32)
find_library(M_LIBRARY