- 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 ff57cf6..5ad1bd6 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 9e552be..9740673 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 c179d53..0a985ac 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 c0716e2..4939e1d 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 03fd4a3..8b8a300 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 4784ce8..bc03e69 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 950947f..c1dfc2c 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 334c8e6..a0bf236 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 ce9f012..fc28e21 100644 (file)
@@ -40,7 +40,6 @@ SET(INC ../windowmanager
   ../nodes
   ../gpu
   ../blenfont
-  ${SDL_INC}
 )
 
 IF(WITH_INTERNATIONAL)
index 89820e0..6861f82 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 664aacf..ca21ba5 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 4358eea..a268ffe 100644 (file)
@@ -39,7 +39,6 @@ SET(INC .
   ../nodes
   ../gpu
   ../blenfont
-  ${SDL_INC}
   ${OPENGL_INCLUDE_DIR}
 )
 
index 530664d..a1dce49 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 47a27ff..77bdd80 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)