mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-03 03:27:19 +00:00
Fix a build error on linux platforms
Due to dl* function usage in Core/HW/atrac3plus.cpp on non-windows platforms, Core library needs to be linked with -ldl flag on these platforms. Added a CoreExtraLibs variable in CMakeLists.txt to handle all platform-dependent dependencies of Core, and added dl to this variable on non-win32 platforms.
This commit is contained in:
parent
2b4f3bf26c
commit
02899bdff7
@ -662,6 +662,7 @@ add_library(xbrz STATIC
|
||||
include_directories(ext/xbrz)
|
||||
|
||||
set(CoreExtra)
|
||||
set(CoreExtraLibs)
|
||||
if(ARM)
|
||||
set(CoreExtra ${CoreExtra}
|
||||
Core/MIPS/ARM/ArmAsm.cpp
|
||||
@ -695,6 +696,12 @@ elseif(X86)
|
||||
Core/MIPS/x86/RegCacheFPU.h)
|
||||
endif()
|
||||
|
||||
# atrac3plus.cpp used dl* functions on non-win32 platforms
|
||||
# Core needs to be linked with dl on these platforms
|
||||
if(NOT WIN32)
|
||||
set(CoreExtraLibs ${CoreExtraLibs} dl)
|
||||
endif()
|
||||
|
||||
# 'ppsspp_jni' on ANDROID, 'Core' everywhere else
|
||||
# SHARED on ANDROID, STATIC everywhere else
|
||||
add_library(${CoreLibName} ${CoreLinkType}
|
||||
@ -916,7 +923,7 @@ add_library(${CoreLibName} ${CoreLinkType}
|
||||
Globals.h
|
||||
git-version.cpp)
|
||||
target_link_libraries(${CoreLibName} Common native kirk cityhash xbrz
|
||||
${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})
|
||||
${CoreExtraLibs} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})
|
||||
setup_target_project(${CoreLibName} Core)
|
||||
|
||||
# Generate git-version.cpp at build time.
|
||||
|
Loading…
x
Reference in New Issue
Block a user