Commit 6b62a7d0 authored by Jeremy Cohen's avatar Jeremy Cohen

CMake win32 fixes for shared lib handling. Added CMP0054 policy setting.

parent 308bbc62
......@@ -8,6 +8,9 @@ SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebIn
PROJECT(Nektar++ C CXX)
CMAKE_POLICY(SET CMP0022 NEW)
# Resolves issue with checking string equality for string params that are also
# variable names - this resolves an issue with checking for MSVC on Windows
CMAKE_POLICY(SET CMP0054 NEW)
# Defer to use _ROOT variables to avoid Zlib warning
IF (POLICY CMP0074)
......
......@@ -45,12 +45,14 @@ IF (THIRDPARTY_BUILD_ZLIB)
ENDIF ()
IF (WIN32)
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES STATIC zlib DESCRIPTION "Zlib library")
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES_DEBUG STATIC zlibd DESCRIPTION "Zlib library")
SET(ZLIB_NAME zlib)
SET(ZLIB_NAME_DEBUG zlibd)
ELSE ()
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES SHARED z DESCRIPTION "Zlib library")
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES_DEBUG SHARED z DESCRIPTION "Zlib library")
SET(ZLIB_NAME z)
SET(ZLIB_NAME_DEBUG z)
ENDIF ()
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES SHARED ${ZLIB_NAME} DESCRIPTION "Zlib library")
THIRDPARTY_LIBRARY(ZLIB_LIBRARIES_DEBUG SHARED ${ZLIB_NAME_DEBUG} DESCRIPTION "Zlib library")
MESSAGE(STATUS "Build Zlib: ")
MESSAGE(STATUS " -- Optimized: ${ZLIB_LIBRARIES}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment