Permalink
Browse files

Fixed and finished OpenBSD compilation.

  • Loading branch information...
1 parent ca4c660 commit 9d88562268671eefd546be3c3c7c39028ba61113 Brian Callahan committed with Yohann Ferreira Mar 10, 2013
Showing with 10 additions and 86 deletions.
  1. +4 −23 CMake/Modules/FindOgg.cmake
  2. +5 −61 CMake/Modules/FindVorbis.cmake
  3. +1 −2 src/CMakeLists.txt
@@ -14,34 +14,19 @@
# > www.orxonox.net <
INCLUDE(FindPackageHandleStandardArgs)
-INCLUDE(HandleLibraryTypes)
FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h
PATHS $ENV{OGGDIR}
PATH_SUFFIXES include
)
IF (WIN32)
-FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
+FIND_LIBRARY(OGG_LIBRARY
NAMES libogg libogg-static-mt
PATHS $ENV{OGGDIR}
PATH_SUFFIXES Release
)
ELSE()
-FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
-NAMES ogg
-PATH_SUFFIXES lib
-)
-ENDIF(WIN32)
-
-
-IF(WIN32)
-FIND_LIBRARY(OGG_LIBRARY_DEBUG
-NAMES liboggd libogg_d liboggD libogg_D libogg-static-mt-debug
-PATHS $ENV{OGGDIR}
-PATH_SUFFIXES Debug
-)
-ELSE()
-FIND_LIBRARY(OGG_LIBRARY_DEBUG
+FIND_LIBRARY(OGG_LIBRARY
NAMES ogg
PATH_SUFFIXES lib
)
@@ -50,15 +35,11 @@ ENDIF(WIN32)
# Handle the REQUIRED argument and set OGG_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ogg DEFAULT_MSG
-OGG_LIBRARY_OPTIMIZED
+OGG_LIBRARY
OGG_INCLUDE_DIR
)
-# Collect optimized and debug libraries
-HANDLE_LIBRARY_TYPES(OGG)
-
MARK_AS_ADVANCED(
OGG_INCLUDE_DIR
-OGG_LIBRARY_OPTIMIZED
-OGG_LIBRARY_DEBUG
+OGG_LIBRARY
)
@@ -14,95 +14,39 @@
# > www.orxonox.net <
INCLUDE(FindPackageHandleStandardArgs)
-INCLUDE(HandleLibraryTypes)
FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
PATHS $ENV{VORBISDIR}
PATH_SUFFIXES include
)
IF(WIN32)
-FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
+FIND_LIBRARY(VORBIS_LIBRARIES
NAMES libvorbis libvorbis-static-mt
PATHS $ENV{VORBISDIR}
PATH_SUFFIXES Release
)
ELSE()
-FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
+FIND_LIBRARY(VORBIS_LIBRARIES
NAMES vorbis
PATH_SUFFIXES lib
)
ENDIF(WIN32)
-IF(WIN32)
-FIND_LIBRARY(VORBIS_LIBRARY_DEBUG
-NAMES libvorbis vorbis_d vorbisD vorbis_D libvorbis-static-mt-debug
-PATHS $ENV{VORBISDIR}
-PATH_SUFFIXES Debug
-)
-ELSE()
-FIND_LIBRARY(VORBIS_LIBRARY_DEBUG
-NAMES vorbis vorbis_d vorbisD vorbis_D
-PATH_SUFFIXES lib
-)
-ENDIF(WIN32)
-
-IF(WIN32)
-FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED
-NAMES libvorbisfile
-PATHS $ENV{VORBISDIR}
-PATH_SUFFIXES Release
-)
-ELSE()
-FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED
-NAMES vorbisfile
-PATH_SUFFIXES lib
-)
-ENDIF(WIN32)
-
-IF(WIN32)
-FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG
-NAMES libvorbisfile vorbisfile_d vorbisfileD vorbisfile_D
-PATHS $ENV{VORBISDIR}
-PATH_SUFFIXES Debug
-)
-ELSE()
-FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG
-NAMES vorbisfile vorbisfile_d vorbisfileD vorbisfile_D
-PATH_SUFFIXES lib
-)
-ENDIF(WIN32)
-
-
# Handle the REQUIRED argument and set VORBIS_FOUND
IF(NOT WIN32)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG
-VORBIS_LIBRARY_OPTIMIZED
-VORBISFILE_LIBRARY_OPTIMIZED
+VORBIS_LIBRARIES
VORBIS_INCLUDE_DIR
)
ELSE()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG
-VORBIS_LIBRARY_OPTIMIZED
+VORBIS_LIBRARIES
VORBIS_INCLUDE_DIR
)
ENDIF(NOT WIN32)
-# Collect optimized and debug libraries
-HANDLE_LIBRARY_TYPES(VORBIS)
-IF(NOT WIN32)
-HANDLE_LIBRARY_TYPES(VORBISFILE)
-SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY}) #WIN32 includes VORBISFILE as a static lib
-ELSE()
-SET(VORBIS_LIBRARIES ${VORBIS_LIBRARY} )
-ENDIF(NOT WIN32)
-
MARK_AS_ADVANCED(
VORBIS_INCLUDE_DIR
-VORBIS_LIBRARY_OPTIMIZED
-VORBIS_LIBRARY_DEBUG
-IF(NOT WIN32)
-VORBISFILE_LIBRARY_OPTIMIZED
-VORBISFILE_LIBRARY_DEBUG
-ENDIF(NOT WIN32)
+VORBIS_LIBRARIES
)
View
@@ -481,10 +481,9 @@ IF (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
${SDLIMAGE_LIBRARY}
${OPENGL_LIBRARIES}
${OPENAL_LIBRARY}
-
+ ${VORBISFILES_LIBRARIES}
${OGG_LIBRARY}
${VORBIS_LIBRARIES}
-
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${LUA_LIBRARIES}

0 comments on commit 9d88562

Please sign in to comment.