cmake: A bunch of 32 bit/64 bit stuff.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3022 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-05-16 00:36:42 +00:00
parent b363b7c715
commit 9baed432c9
23 changed files with 81 additions and 8 deletions

View File

@ -51,3 +51,5 @@ set(SoundTouchHeaders
# add library
add_library(${SoundTouchName} STATIC ${SoundTouchSources} ${SoundTouchHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${SoundTouchName} -m32)

View File

@ -39,3 +39,5 @@ set(bzip2Headers
# add library
add_library(${bzip2Name} STATIC ${bzip2Sources} ${bzip2Headers})
# Force the linker into 32 bits mode
target_link_libraries(${bzip2Name} -m32)

View File

@ -42,4 +42,7 @@ set(a52Headers
tendra.h)
# add library
add_library(${a52Name} STATIC ${a52Sources} ${a52Headers})
add_library(${a52Name} STATIC ${a52Sources} ${a52Headers})
# Force the linker into 32 bits mode
target_link_libraries(${a52Name} -m32)

View File

@ -56,3 +56,6 @@ inftrees.h )
# add library
add_library(${zlibName} STATIC ${zlibSources} ${zlibHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${zlibName} -m32)

View File

@ -5,6 +5,24 @@ project(Pcsx2)
# need cmake version >=2.6
cmake_minimum_required(VERSION 2.6)
#-------------------------------------------------------------------------------
# Detect the 32bit/64bit and set the 32bit library path 32_LD_LIBRARY_PATH
#-------------------------------------------------------------------------------
if (UNIX)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
# 64 bits machine
if (EXISTS /usr/lib32)
# 32 bits library in /usr/lib32
set(32_LD_LIBRARY_PATH /usr/lib32)
else (EXISTS /usr/lib32)
set(32_LD_LIBRARY_PATH /usr/lib)
endif (EXISTS /usr/lib32)
else (CMAKE_SIZEOF_VOID_P MATCHES "8")
# 32 bits machine
set(32_LD_LIBRARY_PATH /usr/lib)
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
endif (UNIX)
# set module path
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

View File

@ -42,6 +42,11 @@ find_package(wxWidgets REQUIRED base core adv)
# wx found
if(wxWidgets_FOUND)
if(Linux) # Linux only
# Force the use of 32 bit library
STRING(REGEX REPLACE "/usr/lib/wx" "${32_LD_LIBRARY_PATH}/wx"
wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
endif(Linux)
include(${wxWidgets_USE_FILE})
#else(wxWidgets_FOUND)
# message(FATAL_ERROR "wxWidgets libraries and include files not found.\

View File

@ -167,8 +167,10 @@ add_library(${UtilitiesName} STATIC ${UtilitiesSources} ${UtilitiesHeaders} ${Ut
# link target with wx
target_link_libraries(${UtilitiesName} ${wxWidgets_LIBRARIES})
# Force the linker into 32 bits mode
target_link_libraries(${UtilitiesName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${UtilitiesName} -s)

View File

@ -150,6 +150,9 @@ add_library(${x86emitterName} STATIC ${x86emitterSources} ${x86emitterHeaders})
# link target with wx
target_link_libraries(${x86emitterName} ${wxWidgets_LIBRARIES})
# Force the linker into 32 bits mode
target_link_libraries(${x86emitterName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${x86emitterName} -s)

View File

@ -644,6 +644,9 @@ else(projectZLIB)
target_link_libraries(${pcsx2Name} ${ZLIB_LIBRARIES})
endif(projectZLIB)
# Force the linker into 32 bits mode
target_link_libraries(${pcsx2Name} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${pcsx2Name} -s)

View File

@ -64,7 +64,7 @@ set_target_properties(${CDVDisoName} PROPERTIES
# Link with bz2
target_link_libraries(${CDVDisoName} ${BZIP2_LIBRARIES})
# Set link flags
# Force the linker into 32 bits mode
target_link_libraries(${CDVDisoName} -m32)
# Linker strip option

View File

@ -62,6 +62,9 @@ add_library(${CDVDnullName} SHARED
${CDVDnullLinuxSources}
${CDVDnullLinuxHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${CDVDnullName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${CDVDnullName} -s)

View File

@ -60,6 +60,9 @@ add_library(${FWnullName} SHARED
${FWnullLinuxSources}
${FWnullLinuxHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${FWnullName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${FWnullName} -s)

View File

@ -82,6 +82,9 @@ add_library(${GSnullName} SHARED
${GSnullLinuxSources}
${GSnullLinuxHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${GSnullName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${GSnullName} -s)

View File

@ -68,6 +68,9 @@ add_library(${PadNullName} SHARED
${PadNullLinuxSources}
${PadNullLinuxHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${PadNullName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${PadNullName} -s)

View File

@ -64,6 +64,10 @@ add_library(${SPU2nullName} SHARED
${SPU2nullLinuxSources}
${SPU2nullLinuxHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${SPU2nullName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${SPU2nullName} -s)

View File

@ -60,6 +60,9 @@ add_library(${USBnullName} SHARED
${USBnullLinuxSources}
${USBnullLinuxHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${USBnullName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${USBnullName} -s)

View File

@ -57,6 +57,9 @@ add_library(${dev9nullName} SHARED
${dev9nullLinuxSources}
${dev9nullLinuxHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${dev9nullName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${dev9nullName} -s)

View File

@ -71,6 +71,9 @@ add_library(${onepadName} SHARED
${onepadLinuxSources}
${onepadLinuxHeaders})
# Force the linker into 32 bits mode
target_link_libraries(${onepadName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${onepadName} -s)

View File

@ -127,8 +127,9 @@ endif(projectSoundTouch)
# link target with A52
target_link_libraries(${spu2xName} a52)
target_link_libraries(${spu2xName} -m32)
# Force the linker into 32 bits mode
target_link_libraries(${spu2xName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)

View File

@ -130,6 +130,9 @@ target_link_libraries(${zerogsName} ${X11_LIBRARIES})
# link target with X11 videomod
target_link_libraries(${zerogsName} ${X11_Xxf86vm_LIB})
# Force the linker into 32 bits mode
target_link_libraries(${zerogsName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${zerogsName} -s)

View File

@ -79,7 +79,7 @@ set_target_properties(${zeropadName} PROPERTIES
# link target with SDL
target_link_libraries(${zeropadName} ${SDL_LIBRARY})
# Set link flag
# Force the linker into 32 bits mode
target_link_libraries(${zeropadName} -m32)
# Linker strip option

View File

@ -101,6 +101,9 @@ else(projectSoundTouch)
target_link_libraries(${zerospu2Name} ${SOUNDTOUCH_LIBRARIES})
endif(projectSoundTouch)
# Force the linker into 32 bits mode
target_link_libraries(${zerospu2Name} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${zerospu2Name} -s)

View File

@ -154,10 +154,10 @@ target_link_libraries(${zzoglName} ${X11_LIBRARIES})
# link target with X11 videomod
target_link_libraries(${zzoglName} ${X11_Xxf86vm_LIB})
# Set link flag
target_link_libraries(${zzoglName} -m32)
# Force the linker into 32 bits mode
target_link_libraries(${zzoglName} -m32)
# Linker strip option
if (CMAKE_BUILD_STRIP)
target_link_libraries(${zzoglName} -s)