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:
Glenn Rice 2011-01-08 05:27:18 +00:00
parent 3cf8003a55
commit aac34f037f
2 changed files with 15 additions and 0 deletions

View File

@ -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)

View File

@ -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})