summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5cf1f8..dbe709e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,15 @@ add_executable(AltCraft ${HEADERS} ${SOURCES} ${MANIFEST})
# CONFIGURATION
################
+option(ENABLE_OPTICK "Enable profiler \"Optick \"?" OFF)
+
+#Configure Optick
+if (${ENABLE_OPTICK})
+ add_definitions(-DUSE_OPTICK=1)
+else()
+ add_definitions(-DUSE_OPTICK=0)
+endif()
+
#Configure easlylogging++
set(LOGGER_DEFINITIONS "-DELPP_THREAD_SAFE -DELPP_FEATURE_PERFORMANCE_TRACKING")
if (LINUX)
@@ -57,6 +66,11 @@ add_subdirectory(external)
target_include_directories(AltCraft PUBLIC external/include)
target_link_libraries(AltCraft deps)
+target_include_directories(AltCraft PUBLIC external/optick)
+if (${ENABLE_OPTICK})
+ target_link_libraries(AltCraft optick)
+endif()
+
#Setup SDL2
find_package(SDL2 REQUIRED)
target_link_libraries(AltCraft ${SDL2_LIBRARY})