mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
improvements for static build and a bit of cleaning
This commit is contained in:
@@ -8,12 +8,14 @@
|
||||
# Look for the header file.
|
||||
FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h
|
||||
PATHS /usr/local/include/
|
||||
/opt/local/include/)
|
||||
/usr/include/
|
||||
/opt/local/include/)
|
||||
MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
|
||||
|
||||
# Look for the library.
|
||||
FIND_LIBRARY(CURL_LIBRARY NAMES curl curl-gnutls
|
||||
PATHS /usr/local/lib/
|
||||
/usr/lib/
|
||||
/opt/local/lib/)
|
||||
MARK_AS_ADVANCED(CURL_LIBRARY)
|
||||
|
||||
|
@@ -59,3 +59,4 @@ ELSE (FTGL_FOUND)
|
||||
ENDIF (FTGL_FIND_REQUIRED)
|
||||
ENDIF (FTGL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(FTGL_INCLUDE_DIR FTGL_LIBRARY)
|
||||
|
@@ -5,15 +5,22 @@
|
||||
# FONTCONFIG_LIBRARIES - List of libraries when using FONTCONFIG.
|
||||
# FONTCONFIG_FOUND - True if FONTCONFIG found.
|
||||
|
||||
IF(WANT_STATIC_LIBS)
|
||||
OPTION(FONTCONFIG_STATIC "Set to ON to link your project with static library (instead of DLL)." ON)
|
||||
ENDIF()
|
||||
|
||||
# Look for the header file.
|
||||
FIND_PATH( FONTCONFIG_INCLUDE_DIR NAMES fontconfig/fontconfig.h
|
||||
DOC "Path in which the file fontconfig/fontconfig.h is located." )
|
||||
MARK_AS_ADVANCED(FONTCONFIG_INCLUDE_DIR)
|
||||
|
||||
# Look for the library.
|
||||
FIND_LIBRARY( FONTCONFIG_LIBRARY NAMES fontconfig
|
||||
DOC "Path to fontconfig library." )
|
||||
IF(FONTCONFIG_STATIC)
|
||||
FIND_LIBRARY( FONTCONFIG_LIBRARY NAMES libfontconfig.a fontconfig
|
||||
DOC "Path to fontconfig library." )
|
||||
ELSE()
|
||||
FIND_LIBRARY( FONTCONFIG_LIBRARY NAMES fontconfig
|
||||
DOC "Path to fontconfig library." )
|
||||
ENDIF()
|
||||
MARK_AS_ADVANCED(FONTCONFIG_LIBRARY)
|
||||
|
||||
# Copy the results to the output variables.
|
||||
|
@@ -80,3 +80,4 @@ ELSE (FRIBIDI_FOUND)
|
||||
ENDIF (FRIBIDI_FIND_REQUIRED)
|
||||
ENDIF (FRIBIDI_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(FRIBIDI_LIBRARY xFRIBIDI_INCLUDE_DIR)
|
||||
|
@@ -45,11 +45,10 @@ ELSE (WIN32)
|
||||
DOC "The GLEW library")
|
||||
ENDIF (WIN32)
|
||||
|
||||
IF (GLEW_INCLUDE_PATH)
|
||||
IF(GLEW_INCLUDE_PATH)
|
||||
SET( GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
|
||||
ELSE (GLEW_INCLUDE_PATH)
|
||||
ELSE()
|
||||
SET( GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
|
||||
ENDIF (GLEW_INCLUDE_PATH)
|
||||
|
||||
MARK_AS_ADVANCED( GLEW_FOUND )
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(GLEW_FOUND GLEW_INCLUDE_PATH GLEW_LIBRARY)
|
||||
|
@@ -57,14 +57,15 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
|
||||
NAMES
|
||||
glibconfig.h
|
||||
PATHS
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/opt/gnome/lib64
|
||||
/opt/gnome/lib
|
||||
/opt/lib/
|
||||
/opt/local/lib
|
||||
/sw/lib/
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/include
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
PATH_SUFFIXES
|
||||
glib-2.0/include
|
||||
@@ -75,11 +76,11 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
|
||||
NAMES
|
||||
glib.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/gnome/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
PATH_SUFFIXES
|
||||
glib-2.0
|
||||
)
|
||||
@@ -92,11 +93,11 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
|
||||
glib-2.0
|
||||
glib
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/gnome/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
IF ( _glib2_include_DIR AND _glib2_link_DIR )
|
||||
SET ( _glib2_FOUND TRUE )
|
||||
@@ -118,22 +119,22 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
|
||||
NAMES
|
||||
libintl.h
|
||||
PATHS
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/gnome/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LIBINTL_LIBRARY
|
||||
NAMES
|
||||
intl
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/opt/gnome/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
IF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
|
||||
@@ -147,13 +148,11 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
|
||||
NAMES
|
||||
iconv.h
|
||||
PATHS
|
||||
/opt/gnome/include
|
||||
/opt/local/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
/sw/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/opt/gnome/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
PATH_SUFFIXES
|
||||
glib-2.0
|
||||
)
|
||||
@@ -162,11 +161,11 @@ ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
|
||||
NAMES
|
||||
iconv
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/gnome/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
|
||||
|
@@ -111,3 +111,4 @@ else (LIBVLC_FOUND)
|
||||
endif (LIBVLC_FIND_REQUIRED)
|
||||
endif (LIBVLC_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(LIBVLCCORE_LIBRARY LIBVLC_INCLUDE_DIR LIBVLC_LIBRARY)
|
||||
|
@@ -201,7 +201,5 @@ else ()
|
||||
message (STATUS "Could not find miniupnp")
|
||||
endif ()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
MINIUPNPC_INCLUDE_DIR
|
||||
MINIUPNPC_LIBRARY)
|
||||
MARK_AS_ADVANCED(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY)
|
||||
|
||||
|
@@ -14,32 +14,31 @@ ENDIF()
|
||||
# check for cache to avoid littering log
|
||||
IF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY)
|
||||
SET(OGG_BE_QUIET TRUE)
|
||||
ENDIF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY)
|
||||
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h)
|
||||
|
||||
#IF (OGG_STATIC AND NOT OGG_LIBRARY)
|
||||
# FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a ogg)
|
||||
#ELSE()
|
||||
IF (OGG_STATIC AND NOT OGG_LIBRARY)
|
||||
FIND_LIBRARY(OGG_LIBRARY NAMES libogg.a ogg)
|
||||
ELSE()
|
||||
FIND_LIBRARY(OGG_LIBRARY NAMES ogg)
|
||||
#ENDIF()
|
||||
ENDIF()
|
||||
|
||||
#IF (OGG_STATIC AND NOT VORBIS_LIBRARY)
|
||||
# FIND_LIBRARY(VORBIS_LIBRARY NAMES libvorbis.a vorbis)
|
||||
#ELSE()
|
||||
IF (OGG_STATIC AND NOT VORBIS_LIBRARY)
|
||||
FIND_LIBRARY(VORBIS_LIBRARY NAMES libvorbis.a vorbis)
|
||||
ELSE()
|
||||
FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis)
|
||||
#ENDIF()
|
||||
ENDIF()
|
||||
|
||||
#on macosx the vorbisfile library is part of the vorbisone...
|
||||
#on macosx the vorbisfile library is part of the vorbisone...
|
||||
#IF(NOT APPLE)
|
||||
# comment above is full of lies
|
||||
|
||||
#IF (OGG_STATIC AND NOT VORBIS_FILE_LIBRARY)
|
||||
# FIND_LIBRARY(VORBIS_FILE_LIBRARY NAMES libvorbisfile.a vorbisfile)
|
||||
#ELSE()
|
||||
IF (OGG_STATIC AND NOT VORBIS_FILE_LIBRARY)
|
||||
FIND_LIBRARY(VORBIS_FILE_LIBRARY NAMES libvorbisfile.a vorbisfile)
|
||||
ELSE()
|
||||
FIND_LIBRARY(VORBIS_FILE_LIBRARY NAMES vorbisfile)
|
||||
#ENDIF()
|
||||
ENDIF()
|
||||
|
||||
#ENDIF(NOT APPLE)
|
||||
|
||||
@@ -51,10 +50,10 @@ IF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND (APPLE OR VORBIS_FILE_
|
||||
MESSAGE(STATUS "Vorbis library : ${VORBIS_LIBRARY}")
|
||||
MESSAGE(STATUS "Vorbis file library: ${VORBIS_FILE_LIBRARY}")
|
||||
ENDIF(NOT OGG_BE_QUIET)
|
||||
ELSE(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND (APPLE OR VORBIS_FILE_LIBRARY))
|
||||
ELSE()
|
||||
SET(OGG_FOUND FALSE)
|
||||
MESSAGE("OGG/Vorbis was not found on this system!")
|
||||
ENDIF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND (APPLE OR VORBIS_FILE_LIBRARY))
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OGG_INCLUDE_DIR
|
||||
|
Reference in New Issue
Block a user