mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-03 08:01:11 +00:00
Added a FASTLOG option for the cmake build to enable all logs.
Also make sure all necessary include directories are added in the check_lib macro. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6571 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
dde2d1a117
commit
3d3411f3a0
@ -77,6 +77,12 @@ if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
add_definitions(-fomit-frame-pointer)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
|
||||
option(FASTLOG "Enable all logs" OFF)
|
||||
if(FASTLOG)
|
||||
add_definitions(-DDEBUGFAST)
|
||||
endif()
|
||||
|
||||
|
||||
########################################
|
||||
# Dependency checking
|
||||
#
|
||||
@ -109,7 +115,6 @@ endif(ALSA_FOUND)
|
||||
check_lib(AO ao QUIET)
|
||||
if(AO_FOUND)
|
||||
add_definitions(-DHAVE_AO=1)
|
||||
include_directories(${AO_INCLUDE_DIRS})
|
||||
message("ao found, enabling ao sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_AO=0)
|
||||
@ -119,7 +124,6 @@ endif(AO_FOUND)
|
||||
check_lib(BLUEZ bluez QUIET)
|
||||
if(BLUEZ_FOUND)
|
||||
add_definitions(-DHAVE_BLUEZ=1)
|
||||
include_directories(${BLUEZ_INCLUDE_DIRS})
|
||||
message("bluez found, enabling bluetooth support")
|
||||
else()
|
||||
add_definitions(-DHAVE_BLUEZ=0)
|
||||
@ -129,7 +133,6 @@ endif(BLUEZ_FOUND)
|
||||
check_lib(PULSEAUDIO libpulse QUIET)
|
||||
if(PULSEAUDIO_FOUND)
|
||||
add_definitions(-DHAVE_PULSEAUDIO=1)
|
||||
include_directories(${PULSEAUDIO_INCLUDE_DIR})
|
||||
message("PulseAudio found, enabling PulseAudio sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_PULSEAUDIO=0)
|
||||
@ -240,7 +243,6 @@ include_directories(Externals/Lua)
|
||||
check_lib(LZO lzo2 lzo/lzo1x.h QUIET)
|
||||
if(LZO_FOUND)
|
||||
message("Using shared lzo")
|
||||
include_directories(${LZO_INCLUDE})
|
||||
else()
|
||||
message("Shared lzo not found, falling back to the static library")
|
||||
add_subdirectory(Externals/LZO)
|
||||
@ -261,7 +263,6 @@ endif(SDL_FOUND)
|
||||
check_lib(SFML sfml-network SFML/Network/Ftp.hpp QUIET)
|
||||
if(SFML_FOUND)
|
||||
message("Using shared sfml-network")
|
||||
include_directories(${SFML_INCLUDE})
|
||||
else()
|
||||
message("Shared sfml-network not found, falling back to the static library")
|
||||
add_subdirectory(Externals/SFML)
|
||||
@ -271,7 +272,6 @@ endif()
|
||||
check_lib(SOIL SOIL SOIL/SOIL.h QUIET)
|
||||
if(SOIL_FOUND)
|
||||
message("Using shared SOIL")
|
||||
include_directories(${SOIL_INCLUDE})
|
||||
else()
|
||||
message("Shared SOIL not found, falling back to the static library")
|
||||
add_subdirectory(Externals/SOIL)
|
||||
@ -325,9 +325,6 @@ if(NOT DISABLE_WX)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
check_lib(GTK2 gtk+-2.0 REQUIRED)
|
||||
if(GTK2_FOUND)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
endif(GTK2_FOUND)
|
||||
endif()
|
||||
|
||||
message("wxWidgets found, enabling GUI build")
|
||||
|
@ -1,7 +1,7 @@
|
||||
include(FindPkgConfig OPTIONAL)
|
||||
|
||||
macro(_internal_message msg _quiet)
|
||||
if(NOT _quiet)
|
||||
macro(_internal_message msg)
|
||||
if(NOT ${_is_quiet})
|
||||
message("${msg}")
|
||||
endif()
|
||||
endmacro()
|
||||
@ -9,18 +9,17 @@ endmacro()
|
||||
macro(check_lib var lib)
|
||||
set(_is_required 0)
|
||||
set(_is_quiet 0)
|
||||
set(_arg_list ${ARGN})
|
||||
foreach(_arg ${ARGN})
|
||||
if(_arg STREQUAL "REQUIRED")
|
||||
list(REMOVE_ITEM _arg_list "REQUIRED")
|
||||
set(_is_required 1)
|
||||
endif()
|
||||
if(_arg STREQUAL "QUIET")
|
||||
list(REMOVE_ITEM _arg_list "QUIET")
|
||||
set(_is_quiet 1)
|
||||
endif()
|
||||
endforeach()
|
||||
if(ARGN)
|
||||
list(REMOVE_ITEM ${ARGN} "REQUIRED")
|
||||
list(REMOVE_ITEM ${ARGN} "QUIET")
|
||||
endif()
|
||||
|
||||
if(PKG_CONFIG_FOUND AND NOT ${var}_FOUND)
|
||||
string(TOLOWER ${lib} lower_lib)
|
||||
@ -28,20 +27,23 @@ macro(check_lib var lib)
|
||||
endif()
|
||||
|
||||
if(${var}_FOUND)
|
||||
_internal_message("${lib} found" _is_quiet)
|
||||
include_directories(${${var}_INCLUDE_DIRS})
|
||||
# Make sure include directories for headers found using find_path below
|
||||
# are re-added when reconfiguring
|
||||
include_directories(${${var}_INCLUDE})
|
||||
_internal_message("${lib} found")
|
||||
else()
|
||||
find_library(${var} ${lib})
|
||||
foreach(_file ${ARGN})
|
||||
find_path(${var}_INCLUDE ${_file})
|
||||
endforeach()
|
||||
find_path(${var}_INCLUDE ${_arg_list})
|
||||
if(${var} AND ${var}_INCLUDE)
|
||||
_internal_message("${lib} found" _is_quiet)
|
||||
include_directories(${${var}_INCLUDE})
|
||||
_internal_message("${lib} found")
|
||||
set(${var}_FOUND 1 CACHE INTERNAL "")
|
||||
else()
|
||||
if(_is_required)
|
||||
message(FATAL_ERROR "${lib} is required but not found")
|
||||
else()
|
||||
_internal_message("${lib} not found" _is_quiet)
|
||||
_internal_message("${lib} not found")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user