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)