Fix: compiling with cmake 2.4 didn't work anymore due to a
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 5 Sep 2008 21:57:34 +0000 (21:57 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 5 Sep 2008 21:57:34 +0000 (21:57 +0000)
compatibility fix for cmake 2.6.

CMake/macros.cmake

index e3dd46eb5ea11a8daf77ca045c7c98a0702db37a..95799a2c1fdbc1189e3829dbdb53c4610ddf05e6 100644 (file)
@@ -39,7 +39,9 @@ ENDMACRO(BLENDERLIB)
 
 MACRO(SETUP_LIBDIRS)
   # see "cmake --help-policy CMP0003"
-  CMAKE_POLICY(SET CMP0003 NEW)
+  if(COMMAND cmake_policy)
+    CMAKE_POLICY(SET CMP0003 NEW)
+  endif(COMMAND cmake_policy)
   LINK_DIRECTORIES(${PYTHON_LIBPATH} ${SDL_LIBPATH} ${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${ICONV_LIBPATH} ${OPENEXR_LIBPATH} ${QUICKTIME_LIBPATH} ${FFMPEG_LIBPATH})
   IF(WITH_INTERNATIONAL)
     LINK_DIRECTORIES(${GETTEXT_LIBPATH})