dont link against SDL when disabled
authorCampbell Barton <ideasman42@gmail.com>
Sat, 15 Aug 2009 17:46:45 +0000 (17:46 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 15 Aug 2009 17:46:45 +0000 (17:46 +0000)
CMake/macros.cmake

index 5ad1bd6a84f2200d2639f732714c840866bdbd9d..dfff2722b83fcc4f6a77e679700d54f42ca43fd3 100644 (file)
@@ -68,7 +68,7 @@ MACRO(SETUP_LIBLINKS
   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_LIBRARY} ${LLIBS})
 
-  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${FFTW3_LIB} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${LLIBS})
+  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${FFTW3_LIB} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS})
 
   # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
 
@@ -85,7 +85,7 @@ MACRO(SETUP_LIBLINKS
   ENDIF(WIN32)
 
 
-  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} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${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
@@ -108,6 +108,9 @@ MACRO(SETUP_LIBLINKS
   IF(WITH_OPENAL)
     TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIBRARY})
   ENDIF(WITH_OPENAL)
+  IF(WITH_SDL)
+    TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
+  ENDIF(WITH_SDL)
   IF(WIN32)
     TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
   ENDIF(WIN32)