SetupEasyProfiler.cmake 526 Bytes
Newer Older
1 2
option(EASY_PROFILER "Enable the profiler" OFF)
if(EASY_PROFILER)
3 4
    # Optional external dependencies
    find_package(easy_profiler)
5

6 7
    if(easy_profiler_FOUND)
        # Do nothing, add definitions below
8 9 10 11 12 13
    else()
        message(WARNING "EasyProfiler dependency not found on system, DISABLING it!")
        set(EASY_PROFILER OFF)
    endif()
endif()

14 15 16
if(EASY_PROFILER)
    add_definitions(-DENABLE_EASY_PROFILER)
else()
17 18 19 20
    add_definitions(-DDISABLE_EASY_PROFILER)
endif()

message("-- Easy Profiler: ${EASY_PROFILER}")