fix windows compilation with dll (frontend and engine)
authorkoda
Fri, 28 Aug 2009 02:52:26 +0000
changeset 2336 66c751f7a28e
parent 2335 0a61a3c2efc4
child 2337 723f1cbe2ef3
fix windows compilation with dll (frontend and engine)
QTfrontend/CMakeLists.txt
cmake_modules/FindOggVorbis.cmake
--- a/QTfrontend/CMakeLists.txt	Thu Aug 27 17:33:01 2009 +0000
+++ b/QTfrontend/CMakeLists.txt	Fri Aug 28 02:52:26 2009 +0000
@@ -172,8 +172,8 @@
 	openalbridge
 )
 
-#openalbridge is linked statically in unix, dynamically in windows; for static we need to explicitly link dependencies -- if we ever change this remember that in windows library order counts
-if(NOT WIN32 AND NOT APPLE)
+#remember that in windows library order counts
+if(NOT APPLE)
 	set(HW_LINK_LIBS
 		${HW_LINK_LIBS}
 		${OPENAL_LIBRARY}
@@ -181,9 +181,8 @@
 		${VORBIS_LIBRARY}
 		${VORBISFILE_LIBRARY}
 		)
-endif()
+else()
 #no vorbisfile required for MacOS X
-if(APPLE)
 	set(HW_LINK_LIBS
 		${OPENAL_LIBRARY}
 		${OGG_LIBRARY}
@@ -191,7 +190,7 @@
 		${HW_LINK_LIBS}
 		${SPARKLE_LIBRARY}
 		)
-endif(APPLE)
+endif()
 
 
 if(WIN32 AND NOT UNIX)
--- a/cmake_modules/FindOggVorbis.cmake	Thu Aug 27 17:33:01 2009 +0000
+++ b/cmake_modules/FindOggVorbis.cmake	Fri Aug 28 02:52:26 2009 +0000
@@ -20,7 +20,7 @@
 find_library(OGG_LIBRARY NAMES ogg)
 find_library(VORBIS_LIBRARY NAMES vorbis)
 find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
-if (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
+if (OGG_LIBRARY AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
    set(OGGVORBIS_FOUND TRUE)
 #  [sommer] (for SuperTux) reversed order of libraries, so that cmake 2.4.5 for Windows generates an MSYS Makefile that will link correctly
 #  set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY})
@@ -34,10 +34,10 @@
    else (HAVE_LIBVORBISENC2)
       set (OGGVORBIS_VERSION 1)
    endif (HAVE_LIBVORBISENC2)
-else (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
+else ()
    set (OGGVORBIS_VERSION)
    set(OGGVORBIS_FOUND FALSE)
-endif (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY)
+endif ()
 if (OGGVORBIS_FOUND)
    if (NOT OggVorbis_FIND_QUIETLY)
       message(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}")