From a404f2e6fa6a9820c1c51241daf489406a7622e2 Mon Sep 17 00:00:00 2001 From: Peter Tissen Date: Wed, 18 Feb 2015 19:30:04 +0100 Subject: [PATCH] Add iconv to linked libs on non-linux UNIX of course the correct solution would be to actually search for the symbols but that seems like a lot of efford just for the sake of doing it right. This should probably suffice for all relevant platforms for now. --- rpcs3/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 3ee55b19e8..ececaa4980 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -43,9 +43,14 @@ if (APPLE) endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(RT_LIB "rt") + #on some Linux distros shm_unlink and similar functions are in librt only + set(ADDITIONAL_LIBS "rt") +elseif(UNIX) + #it seems like glibc includes the iconv functions we use but other libc + #implementations like the one on OSX don't seem implement them + set(ADDITIONAL_LIBS "iconv") else() - set(RT_LIB "") + set(ADDITIONAL_LIBS "") endif() If( NOT RPCS3_SRC_DIR) @@ -126,7 +131,7 @@ set_source_files_properties(${RPCS3_SRC_DIR}/Emu/Cell/PPULLVMRecompiler.cpp PROP add_executable(rpcs3 ${RPCS3_SRC}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_CURRENT_BINARY_DIR}/../asmjit/") #hack because the asmjit cmake file force fno exceptions -target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES} libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a ${ZLIB_LIBRARIES} ${LLVM_LIBS} ${RT_LIB} ) +target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES} libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a ${ZLIB_LIBRARIES} ${LLVM_LIBS} ${ADDITIONAL_LIBS} ) set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h") cotire(rpcs3)