Added an option in the cmake build to disable wxWidgets. To use add "-DDISABLE_WX=1" to the cmake configuration command. Also fixed the nowx build.

Set scons build to autodetect OpenCL by checking for both the library and header instead of having an option.  Unfortunately there probably needs to be a path variable that can be set to the location to look for the headers.  For example on Ubuntu with nvidia, the headers are located in /usr/include/nvidia-current instead of /usr/include, and hence not found by scons.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6355 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2010-11-07 17:45:35 +00:00
parent 58c8e7cb48
commit e96943c121
5 changed files with 15 additions and 15 deletions

View File

@ -33,10 +33,10 @@ endif()
include(FindPkgConfig REQUIRED)
# Various compile flags
add_definitions(-msse2 -Wall)
add_definitions(-msse2 -Wall -Wno-unused-result)
# gcc uses some optimizations which might break stuff without this flag
add_definitions(-fno-strict-aliasing)
add_definitions(-fno-strict-aliasing -fno-exceptions)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-fvisibility-inlines-hidden VISIBILITY_INLINES_HIDDEN)
@ -88,7 +88,10 @@ include(FindOpenGL REQUIRED)
include(FindALSA OPTIONAL)
include(FindOpenAL OPTIONAL)
include(FindwxWidgets OPTIONAL)
set(DISABLE_WX FALSE CACHE BOOL "Disable wxWidgets (use CLI interface)")
if(NOT DISABLE_WX)
include(FindwxWidgets OPTIONAL)
endif(NOT DISABLE_WX)
if(UNIX)
include(FindX11 REQUIRED)
endif(UNIX)

View File

@ -1,8 +1,6 @@
# TODO?
#luaenv = env.Clone()
#
#if not sys.platform == 'win32':
# luaenv['CPPDEFINES'].append('LUA_USE_LINUX') # Also works for OS X
if(UNIX)
add_definitions(-DLUA_USE_LINUX)
endif(UNIX)
set(SRCS lapi.c
lauxlib.c

View File

@ -36,7 +36,6 @@ if env['PLATFORM'] == 'posix': vars.AddVariables(
'/usr', PathVariable.PathAccept),
PathVariable('userdir', 'Set the name of the user data directory in home',
'.dolphin-emu', PathVariable.PathAccept),
BoolVariable('opencl', 'Build with OpenCL', False),
EnumVariable('pgo', 'Profile-Guided Optimization (generate or use)', 'none',
allowed_values = ('none', 'generate', 'use'), ignorecase = 2),
BoolVariable('shared_glew', 'Use system shared libGLEW', True),
@ -275,11 +274,9 @@ else:
print "Must have CgGL to build"
Exit(1)
if env['opencl']:
env['HAVE_OPENCL'] = conf.CheckPKG('OpenCL')
env['HAVE_OPENCL'] = int(conf.CheckPKG('OpenCL') and \
conf.CheckCXXHeader("CL/cl.h"))
conf.Define('HAVE_OPENCL', env['HAVE_OPENCL'])
else:
env['HAVE_OPENCL'] = 0
# PGO - Profile Guided Optimization
if env['pgo'] == 'generate':

View File

@ -8,7 +8,8 @@ set(LIBS core
common
lua
z
sfml-network)
sfml-network
wiiuse)
if(wxWidgets_FOUND)
set(MEMCARDSRCS Src/MemcardManager.cpp

View File

@ -42,6 +42,7 @@
#include "cmdline.h"
#include "Thread.h"
#include "PowerPC/PowerPC.h"
#include "HW/Wiimote.h"
#include "PluginManager.h"
#include "ConfigManager.h"