Only link to librt on Linux

The library is not needed on OSX and does not seem to exists there
This commit is contained in:
Peter Tissen 2015-02-18 15:59:26 +01:00
parent 35e04bdbe3
commit 518c028a3d

View file

@ -42,6 +42,12 @@ if (APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/opt/X11/include")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(RT_LIB "rt")
else()
set(RT_LIB "")
endif()
If( NOT RPCS3_SRC_DIR)
SET(RPCS3_SRC_DIR ${CMAKE_CURRENT_LIST_DIR})
Message("-- Initializing RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
@ -120,7 +126,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)
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} )
set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h")
cotire(rpcs3)