- remove UNSET becuase it only works with newer versions of cmake,
authorCampbell Barton <ideasman42@gmail.com>
Sat, 15 Aug 2009 13:30:28 +0000 (13:30 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 15 Aug 2009 13:30:28 +0000 (13:30 +0000)
- changed the SDL and Freetype vars to match CMake's names
- removed unneeded freetype, SDL and ftgl includes

14 files changed:
CMake/macros.cmake
CMakeLists.txt
extern/libopenjpeg/CMakeLists.txt
intern/audaspace/CMakeLists.txt
intern/elbeem/CMakeLists.txt
source/blender/blenfont/CMakeLists.txt
source/blender/blenkernel/CMakeLists.txt
source/blender/blenlib/CMakeLists.txt
source/blender/editors/CMakeLists.txt
source/blender/editors/screen/CMakeLists.txt
source/blender/nodes/CMakeLists.txt
source/blender/windowmanager/CMakeLists.txt
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/Ketsji/CMakeLists.txt

index ff57cf6e34bb6997f7f0460ebea7e8e91db44d0a..5ad1bd6a84f2200d2639f732714c840866bdbd9d 100644 (file)
@@ -66,9 +66,9 @@ ENDMACRO(SETUP_LIBDIRS)
 MACRO(SETUP_LIBLINKS
   target)
   SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
-  #TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
+  #TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIBRARY} ${LLIBS})
 
-  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${FFTW3_LIB} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIB} ${LLIBS})
+  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${FFTW3_LIB} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${LLIBS})
 
   # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
 
@@ -85,8 +85,8 @@ MACRO(SETUP_LIBLINKS
   ENDIF(WIN32)
 
 
-  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
-  TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIB} ${LIBSAMPLERATE_LIB})
+  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIBRARY} ${LLIBS})
+  TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY} ${LIBSAMPLERATE_LIB})
 
   # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
 
@@ -106,7 +106,7 @@ MACRO(SETUP_LIBLINKS
     TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
   ENDIF(WITH_INTERNATIONAL)
   IF(WITH_OPENAL)
-    TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIB})
+    TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIBRARY})
   ENDIF(WITH_OPENAL)
   IF(WIN32)
     TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
index 9e552be8616525cd6bdab1cd78f109774a021d5c..974067383d44f698fd92c65ec1b41869191c4434 100644 (file)
@@ -95,10 +95,6 @@ IF(UNIX AND NOT APPLE)
     FIND_PACKAGE(OpenAL)
     IF(OPENAL_FOUND)
       SET(WITH_OPENAL ON)
-      SET(OPENAL_LIB ${OPENAL_LIBRARY})
-      SET(OPENAL_INC ${OPENAL_INCLUDE_DIR})
-      UNSET(OPENAL_LIBRARY CACHE)
-      UNSET(OPENAL_INCLUDE_DIR CACHE)
     ELSE(OPENAL_FOUND)
       SET(WITH_OPENAL OFF)
     ENDIF(OPENAL_FOUND)
@@ -120,11 +116,7 @@ IF(UNIX AND NOT APPLE)
   ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
 
   FIND_PACKAGE(Freetype)
-  SET(FREETYPE_INC "${FREETYPE_INCLUDE_DIR_freetype2}" CACHE STRING "")
-  SET(FREETYPE_LIB "${FREETYPE_LIBRARY}" CACHE STRING "")
-  UNSET(FREETYPE_INCLUDE_DIR_freetype2 CACHE)
-  UNSET(FREETYPE_LIBRARY CACHE)
-  UNSET(FREETYPE_INCLUDE_DIR_ft2build CACHE)
+  # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
 
   # No way to set py31. remove for now.
   # FIND_PACKAGE(PythonLibs)
@@ -142,15 +134,10 @@ IF(UNIX AND NOT APPLE)
 
   IF(WITH_SDL)
     FIND_PACKAGE(SDL)
-    IF(SDL_FOUND)
-      SET(SDL_INC ${SDL_INCLUDE_DIR})
-      SET(SDL_LIB ${SDL_LIBRARY})
-      UNSET(SDL_INCLUDE_DIR CACHE)
-      UNSET(SDL_LIBRARY CACHE)
-      UNSET(SDLMAIN_LIBRARY CACHE)
-    ELSE(SDL_FOUND)
+    # UNSET(SDLMAIN_LIBRARY CACHE)
+    IF(NOT SDL_FOUND)
       SET(WITH_SDL OFF)
-    ENDIF(SDL_FOUND)
+    ENDIF(NOT SDL_FOUND)
   ENDIF(WITH_SDL)
 
   FIND_PATH(OPENEXR_INC
@@ -238,8 +225,8 @@ IF(WIN32)
   ELSE(CMAKE_CL_64)
     #SET(WITH_OPENAL ON)
     SET(OPENAL ${LIBDIR}/openal)
-    SET(OPENAL_INC ${OPENAL}/include)
-    SET(OPENAL_LIB wrap_oal)
+    SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
+    SET(OPENAL_LIBRARY wrap_oal)
     SET(OPENAL_LIBPATH ${OPENAL}/lib)
   ENDIF(CMAKE_CL_64)
 
@@ -282,9 +269,9 @@ IF(WIN32)
   SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
 
   SET(FREETYPE ${LIBDIR}/freetype)
-  SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+  SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
   SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
-  SET(FREETYPE_LIB freetype2ST)
+  SET(FREETYPE_LIBRARY freetype2ST)
   
   SET(OPENEXR ${LIBDIR}/openexr)
   SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
@@ -335,8 +322,8 @@ IF(WIN32)
   ENDIF(WITH_OPENMP)
 
   SET(SDL ${LIBDIR}/sdl)
-  SET(SDL_INC ${SDL}/include)
-  SET(SDL_LIB SDL)
+  SET(SDL_INCLUDE_DIR ${SDL}/include)
+  SET(SDL_LIBRARY SDL)
   SET(SDL_LIBPATH ${SDL}/lib)
 
   SET(PNG "${LIBDIR}/png")
@@ -371,10 +358,6 @@ IF(APPLE)
     FIND_PACKAGE(OpenAL)
     IF(OPENAL_FOUND)
       SET(WITH_OPENAL ON)
-      SET(OPENAL_LIB ${OPENAL_LIBRARY})
-      SET(OPENAL_INC ${OPENAL_INCLUDE_DIR})
-      UNSET(OPENAL_LIBRARY CACHE)
-      UNSET(OPENAL_INCLUDE_DIR CACHE)
     ELSE(OPENAL_FOUND)
       SET(WITH_OPENAL OFF)
     ENDIF(OPENAL_FOUND)
@@ -424,9 +407,9 @@ IF(APPLE)
   SET(ZLIB_LIBRARIES z)
 
   SET(FREETYPE ${LIBDIR}/freetype)
-  SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+  SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
   SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
-  SET(FREETYPE_LIB freetype)
+  SET(FREETYPE_LIBRARY freetype)
 
   SET(OPENEXR ${LIBDIR}/openexr)
   SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
@@ -455,8 +438,8 @@ IF(APPLE)
   ENDIF(WITH_OPENMP)
 
   SET(SDL ${LIBDIR}/sdl)
-  SET(SDL_INC ${SDL}/include)
-  SET(SDL_LIB SDL)
+  SET(SDL_INCLUDE_DIR ${SDL}/include)
+  SET(SDL_LIBRARY SDL)
   SET(SDL_LIBPATH ${SDL}/lib)
 
   SET(PNG "${LIBDIR}/png")
@@ -500,8 +483,8 @@ ENDIF(WITH_WEBPLUGIN)
 # Configure OpenGL.
 FIND_PACKAGE(OpenGL)
 INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
-UNSET(OPENGL_LIBRARIES CACHE)
-UNSET(OPENGL_xmesa_INCLUDE_DIR CACHE)
+# UNSET(OPENGL_LIBRARIES CACHE) # not compat with older cmake 
+# UNSET(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake 
 
 #-----------------------------------------------------------------------------
 # Extra compile flags
index c179d5328b9dd76691fc6a8c969e27524a1bdff3..0a985aceb37b56a88928b3637c7c7cb5bb684332 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC . src ${FREETYPE_INC})
+SET(INC . src)
 
 FILE(GLOB SRC *.c except t1_generate_luts.c)
 ADD_DEFINITIONS(-DWITH_OPENJPEG)
index c0716e2057c640f9219a1c7e751b692c2b19f581..4939e1d38d9dd5e1318c65e40ce6e114a1f76631 100644 (file)
@@ -31,17 +31,17 @@ IF(WITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
 IF(WITH_SDL)
-  SET(INC ${INC} SDL ${SDL_INC})
+  SET(INC ${INC} SDL ${SDL_INCLUDE_DIR})
   FILE(GLOB SDLSRC SDL/*.cpp)
   ADD_DEFINITIONS(-DWITH_SDL)
 ENDIF(WITH_SDL)
 
 IF(WITH_OPENAL)
-  SET(INC ${INC} OpenAL ${OPENAL_INC})
+  SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR})
   FILE(GLOB OPENALSRC OpenAL/*.cpp)
   ADD_DEFINITIONS(-DWITH_OPENAL)
 
-  STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INC})
+  STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR})
   IF(FRAMEWORK)
     ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX)
   ENDIF(FRAMEWORK)
index 03fd4a3fefc75bd6c24da487f8e8ef9672d6d99a..8b8a3000efde9f5a36a309dbbc2256a447ce6244 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC ${PNG_INC} ${ZLIB_INC} ${SDL_INC} extern)
+SET(INC ${PNG_INC} ${ZLIB_INC} extern)
 
 FILE(GLOB SRC intern/*.cpp)
 
index 4784ce88dfcc67e5fae549a7593d6b6e94fb7947..bc03e69eb88b5d044e9e2c0a1c9518fe27bb3976 100644 (file)
@@ -27,8 +27,7 @@ FILE(GLOB SRC intern/*.c)
 SET(INC 
   ../../../intern/guardedalloc ../blenlib ../makesdna ../editors/include
   ../blenkernel ../../../extern/glew/include .
-  ${FTGL_INC}
-  ${FREETYPE_INC}
+  ${FREETYPE_INCLUDE_DIRS}
 )
 
 IF(WITH_INTERNATIONAL)
index 950947f0d24c92a725dd5439124d75c975d52a2a..c1dfc2cf639222fbe78ed2d99923ef38cd37ad43 100644 (file)
@@ -55,12 +55,6 @@ IF(WITH_QUICKTIME)
   ADD_DEFINITIONS(-DWITH_QUICKTIME)
 ENDIF(WITH_QUICKTIME)
 
-IF(WITH_SDL)
-  SET(INC ${INC} ${SDL_INC})
-ELSE(WITH_SDL)
-  ADD_DEFINITIONS(-DDISABLE_SDL)
-ENDIF(WITH_SDL)
-
 IF(WITH_FFMPEG)
   SET(INC ${INC} ${FFMPEG_INC})
   ADD_DEFINITIONS(-DWITH_FFMPEG)
index 334c8e6906bb794cad02ee4442ffc23e33b12e31..a0bf2367b982a94399718152bb7da875cdd0e0f0 100644 (file)
@@ -28,8 +28,7 @@ FILE(GLOB SRC intern/*.c)
 
 SET(INC 
   . ../makesdna ../blenkernel ../../../intern/guardedalloc ../include
-  ${FREETYPE_INC}
-  ${SDL_INC}
+  ${FREETYPE_INCLUDE_DIRS}
   ${ZLIB_INC}
 )
 
index ce9f01235a383dac5468bafe6a60f8c0f509c863..fc28e21ab8f61e43916ced5bc607e72a26b5528e 100644 (file)
@@ -40,7 +40,6 @@ SET(INC ../windowmanager
   ../nodes
   ../gpu
   ../blenfont
-  ${SDL_INC}
 )
 
 IF(WITH_INTERNATIONAL)
index 89820e0d362bc93bc95f4227066a8afc07f46f8f..6861f82ac3f8356338ae3cbe51bb47e67e9ca2bc 100644 (file)
@@ -41,7 +41,6 @@ SET(INC ../../windowmanager
   ../../quicktime ../../../../intern/elbeem/extern
   ../../../../intern/ghost ../../../../intern/opennl/extern
   ../../nodes
-  ${SDL_INC}
 )
 
 IF(WITH_INTERNATIONAL)
index 664aacf11abf94674b7bc9e011875d318645f5ae..ca21ba592a866ff5963f5adf39215c23b3d39538 100644 (file)
@@ -31,7 +31,6 @@ SET(INC
   ../imbuf ../avi ../../../intern/elbeem/extern
   ../../../intern/iksolver/extern ../blenloader ../quicktime
   ../blenkernel ../../../extern/glew/include ../gpu
-  ${SDL_INC}
   ${ZLIB_INC}
 )
 
index 4358eea6f1b80a69b17c57e24cb0bdd090664ba4..a268ffebffbde8ef7c82dbee86cbb30ec9d789af 100644 (file)
@@ -39,7 +39,6 @@ SET(INC .
   ../nodes
   ../gpu
   ../blenfont
-  ${SDL_INC}
   ${OPENGL_INCLUDE_DIR}
 )
 
index 530664dce554ee083782f7686d7b7f6ef8d0d903..a1dce49e14bd4faa35badf5e779a79420da51b47 100644 (file)
@@ -38,7 +38,7 @@ SET(INC
 )
 
 IF(WITH_SDL)
-  SET(INC ${INC} ${SDL_INC})  
+  SET(INC ${INC} ${SDL_INCLUDE_DIR})
 ELSE(WITH_SDL)
   ADD_DEFINITIONS(-DDISABLE_SDL)
 ENDIF(WITH_SDL)
index 47a27ff6e58ad0bbb822261b09feafd62cee9e16..77bdd80721f375e652b31af14a42f70cf4a6a51d 100644 (file)
@@ -66,7 +66,7 @@ SET(INC
 )
 
 IF(WITH_SDL)
-  SET(INC ${INC} ${SDL_INC})  
+  SET(INC ${INC} ${SDL_INCLUDE_DIR})  
 ELSE(WITH_SDL)
   ADD_DEFINITIONS(-DDISABLE_SDL)
 ENDIF(WITH_SDL)