mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Add profiling (via oprofile) to the cmake build.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6782 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3cf8003a55
commit
aac34f037f
@ -204,6 +204,17 @@ else()
|
||||
set(PORTAUDIO_FOUND FALSE)
|
||||
endif(PORTAUDIO)
|
||||
|
||||
option(OPROFILING "Enable profiling" OFF)
|
||||
if(OPROFILING)
|
||||
check_lib(OPROFILE opagent opagent.h)
|
||||
check_lib(BFD bfd bfd.h)
|
||||
if(OPROFILE_FOUND AND BFD_FOUND)
|
||||
message("oprofile found, enabling profiling support")
|
||||
add_definitions(-DUSE_OPROFILE=1)
|
||||
else()
|
||||
message(FATAL_ERROR "oprofile or bfd not found. Can't build profiling support.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
########################################
|
||||
# Setup include directories (and make sure they are preferred over the Externals)
|
||||
|
@ -153,6 +153,10 @@ if(PORTAUDIO_FOUND)
|
||||
set(LIBS ${LIBS} portaudio)
|
||||
endif(PORTAUDIO_FOUND)
|
||||
|
||||
if(OPROFILE_FOUND)
|
||||
set(LIBS ${LIBS} opagent bfd)
|
||||
endif(OPROFILE_FOUND)
|
||||
|
||||
add_library(core STATIC ${SRCS})
|
||||
target_link_libraries(core ${LIBS})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user