diff --git a/CMakeLists.txt b/CMakeLists.txt index f0853c7b30..168f21c699 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,7 +155,7 @@ endif () # Ghoul add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul) -target_link_libraries(openspace-core Ghoul) +target_link_libraries(openspace-core PUBLIC Ghoul) set_openspace_compile_settings(Ghoul) set_folder_location(Lua "External") set_folder_location(lz4 "External") @@ -165,7 +165,7 @@ link_directories("${GHOUL_LIBRARY_DIRS}") # Spice begin_dependency("Spice") add_subdirectory(${OPENSPACE_EXT_DIR}/spice) -target_link_libraries(openspace-core Spice) +target_link_libraries(openspace-core PUBLIC Spice) set_folder_location(Spice "External") end_dependency() @@ -174,13 +174,13 @@ begin_dependency("CURL") if (WIN32) set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl") target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_ROOT_DIR}/include) - target_link_libraries(openspace-core ${CURL_ROOT_DIR}/lib/libcurl.lib) + target_link_libraries(openspace-core PUBLIC ${CURL_ROOT_DIR}/lib/libcurl.lib) target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB") else () find_package(CURL) if (CURL_FOUND) target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_INCLUDE_DIRS}) - target_link_libraries(openspace-core ${CURL_LIBRARIES}) + target_link_libraries(openspace-core PUBLIC ${CURL_LIBRARIES}) target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED") endif () endif () @@ -206,7 +206,7 @@ if (MSVC) if (OPENSPACE_ENABLE_VLD) begin_dependency("Visual Leak Detector") target_compile_definitions(openspace-core PUBLIC "OPENSPACE_ENABLE_VLD") - target_link_libraries(openspace-core ${OPENSPACE_EXT_DIR}/vld/lib/vld.lib) + target_link_libraries(openspace-core PUBLIC ${OPENSPACE_EXT_DIR}/vld/lib/vld.lib) target_include_directories(openspace-core PUBLIC ${OPENSPACE_EXT_DIR}/vld) end_dependency() endif () @@ -217,7 +217,7 @@ if (MSVC) begin_dependency("Intel VTune") target_compile_definitions(openspace-core PUBLIC "OPENSPACE_HAS_VTUNE") target_include_directories(openspace-core PUBLIC "${OPENSPACE_VTUNE_PATH}/include") - target_link_libraries(openspace-core "${OPENSPACE_VTUNE_PATH}/lib64/libittnotify.lib") + target_link_libraries(openspace-core PUBLIC "${OPENSPACE_VTUNE_PATH}/lib64/libittnotify.lib") end_dependency() endif () diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 08dd69ed3f..45852d59ca 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -1354,6 +1354,28 @@ void RenderEngine::renderVersionInformation() { glm::vec4(0.5, 0.5, 0.5, 1.f) ); } + +#ifdef TRACY_ENABLE + { + // If we have Tracy enabled, we should inform the user about it that the + // application will crash after a while if no profiler is attached + + ZoneScopedN("Tracy Information") + + const glm::vec2 tracyBox = _fontInfo->boundingBox("TRACY PROFILING ENABLED"); + const glm::vec2 penPosition = glm::vec2( + fontResolution().x - tracyBox.x - 10.f, + versionBox.y + commitBox.y + 5.f + ); + FR::defaultRenderer().render( + *_fontInfo, + penPosition, + "TRACY PROFILING ENABLED", + glm::vec4(0.8f, 0.2f, 0.15f, 1.f) + ); + } +#endif // TRACY_ENABLE + } void RenderEngine::renderScreenLog() { diff --git a/support/cmake/handle_modules.cmake b/support/cmake/handle_modules.cmake index 6b5edc7fe1..fc0178d699 100644 --- a/support/cmake/handle_modules.cmake +++ b/support/cmake/handle_modules.cmake @@ -143,7 +143,7 @@ function (handle_modules internal_module_path external_modules_paths) # Only link openspace-core against the library if it has been set STATIC get_target_property(library_type ${library_name} TYPE) if (NOT ${library_type} STREQUAL "SHARED_LIBRARY") - target_link_libraries(openspace-core ${library_name}) + target_link_libraries(openspace-core PUBLIC ${library_name}) endif() create_define_name(${name} define_name)