summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2010-11-05 02:23:24 +0000
committerGlenn Rice <glennricster@gmail.com>2010-11-05 02:23:24 +0000
commit2383e2b0f57ebad3eecab885d433341f2dbbfe20 (patch)
treeda966812c1cf3fb43dc0af6213158bd0dea5bebf /Source/Core
parent49a9efb0101fc17444611824d2efec94401a9809 (diff)
Improve the compiler flags for the cmake build system. -fPIC only needs to be specified for static libraries that are linked into shared libraries. cmake automatically uses -fPIC for shared libraries. Also ported several other needed compiler flags from the scons build. Set up the debug build, enabled with "-D CMAKE_BUILD_TYPE=Release", to work with wxWidgets debugging.
Note that most users will want to use the release build to get a -O3 optimized build. This can be enabled by adding "-D CMAKE_BUILD_TYPE=Release". git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6344 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/AudioCommon/CMakeLists.txt3
-rw-r--r--Source/Core/Common/CMakeLists.txt3
-rw-r--r--Source/Core/DSPCore/CMakeLists.txt3
-rw-r--r--Source/Core/DebuggerUICommon/CMakeLists.txt3
-rw-r--r--Source/Core/VideoCommon/CMakeLists.txt3
5 files changed, 15 insertions, 0 deletions
diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt
index da7a000ea2..237ebd6f4d 100644
--- a/Source/Core/AudioCommon/CMakeLists.txt
+++ b/Source/Core/AudioCommon/CMakeLists.txt
@@ -36,3 +36,6 @@ endif()
add_library(audiocommon STATIC ${SRCS})
target_link_libraries(audiocommon ${LIBS})
+if(UNIX)
+ add_definitions(-fPIC)
+endif(UNIX)
diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt
index e7aded6b8e..e573f32d05 100644
--- a/Source/Core/Common/CMakeLists.txt
+++ b/Source/Core/Common/CMakeLists.txt
@@ -40,3 +40,6 @@ if(WIN32)
endif(WIN32)
add_library(common STATIC ${SRCS})
+if(UNIX)
+ add_definitions(-fPIC)
+endif(UNIX)
diff --git a/Source/Core/DSPCore/CMakeLists.txt b/Source/Core/DSPCore/CMakeLists.txt
index 8212a545dc..79a7c588e7 100644
--- a/Source/Core/DSPCore/CMakeLists.txt
+++ b/Source/Core/DSPCore/CMakeLists.txt
@@ -23,3 +23,6 @@ set(SRCS Src/assemble.cpp
Src/Jit/DSPJitMisc.cpp)
add_library(dspcore STATIC ${SRCS})
+if(UNIX)
+ add_definitions(-fPIC)
+endif(UNIX)
diff --git a/Source/Core/DebuggerUICommon/CMakeLists.txt b/Source/Core/DebuggerUICommon/CMakeLists.txt
index a036501b73..45455c93b1 100644
--- a/Source/Core/DebuggerUICommon/CMakeLists.txt
+++ b/Source/Core/DebuggerUICommon/CMakeLists.txt
@@ -3,3 +3,6 @@ set(SRCS Src/CodeView.cpp
Src/MemoryView.cpp)
add_library(debugger_ui_util STATIC ${SRCS})
+if(UNIX)
+ add_definitions(-fPIC)
+endif(UNIX)
diff --git a/Source/Core/VideoCommon/CMakeLists.txt b/Source/Core/VideoCommon/CMakeLists.txt
index 7ebae97765..a52aff9493 100644
--- a/Source/Core/VideoCommon/CMakeLists.txt
+++ b/Source/Core/VideoCommon/CMakeLists.txt
@@ -39,3 +39,6 @@ if(OPENCL_FOUND)
endif(OPENCL_FOUND)
add_library(videocommon STATIC ${SRCS})
+if(UNIX)
+ add_definitions(-fPIC)
+endif(UNIX)