1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 11:52:40 +01:00

Add microprofile to rwengine dependencies

This commit is contained in:
Daniel Evans 2018-08-29 21:06:03 +01:00
parent b9ef99e752
commit 63a2caa471
6 changed files with 39 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "external/microprofile/microprofile"]
path = external/microprofile/microprofile
url = https://github.com/jonasmr/microprofile.git

View File

@ -65,6 +65,8 @@ endif()
# Create a rw_interface TARGET that holds all compiler options
include("${PROJECT_SOURCE_DIR}/cmake_configure.cmake")
add_subdirectory(external)
add_subdirectory(rwcore)
add_subdirectory(rwengine)
add_subdirectory(rwgame)

3
external/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,3 @@
if(ENABLE_PROFILING)
add_subdirectory(microprofile)
endif()

23
external/microprofile/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,23 @@
add_library(microprofile STATIC
microprofile/microprofile.h
microprofile/microprofile_html.h
microprofile/microprofile.cpp
)
target_include_directories(microprofile
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/microprofile"
)
target_compile_definitions(microprofile
PUBLIC
MICROPROFILE_GPU_TIMERS=0
)
find_package(Threads REQUIRED)
target_link_libraries(microprofile
PUBLIC
Threads::Threads
)
add_library(microprofile::microprofile ALIAS microprofile)

1
external/microprofile/microprofile vendored Submodule

@ -0,0 +1 @@
Subproject commit b49ae80262b206a579808dc3e442f0d8aafe81e9

View File

@ -151,6 +151,13 @@ target_link_libraries(rwengine
OpenAL::OpenAL
)
if (ENABLE_PROFILING)
target_link_libraries(rwengine
PUBLIC
microprofile::microprofile
)
endif()
target_include_directories(rwengine
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/src"