mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
b363b7c715
commit
9baed432c9
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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.\
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue