diff --git a/tracy.cmake b/tracy.cmake index 8c8d57f5..e5b2cb00 100644 --- a/tracy.cmake +++ b/tracy.cmake @@ -52,6 +52,12 @@ function(_SETUP_TRACY_HEADER) endif() string(TOLOWER "${HEADER_DIR}" "HEADER_DIR") + if(NOT DEFINED PROJECT_CUSTOM_HEADER_EXTENSION) + set(HEADER_EXTENSION "hh") + else() + set(HEADER_EXTENSION ${PROJECT_CUSTOM_HEADER_EXTENSION}) + endif() + string(REGEX REPLACE "[^a-zA-Z0-9]" "_" PACKAGE_CPPNAME "${PROJECT_NAME}") string(TOUPPER "${PACKAGE_CPPNAME}" PACKAGE_CPPNAME) @@ -61,7 +67,7 @@ function(_SETUP_TRACY_HEADER) HEADER_DIR ${HEADER_DIR} FILENAME - tracy.hpp + tracy.${HEADER_EXTENSION} LIBRARY_NAME ${PACKAGE_CPPNAME} TRACY_ENABLE