mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 16:11:02 +08:00
Install cmake into lib subdir.
Set public target compile definition to BUILD_WITH_EASY_PROFILER. Install to system directory
This commit is contained in:
parent
9d88b3d831
commit
ba0f73bcf6
@ -37,7 +37,7 @@ else()
|
||||
)
|
||||
endif(UNIX)
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/sdk)
|
||||
#set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/sdk)
|
||||
|
||||
add_subdirectory(easy_profiler_core)
|
||||
add_subdirectory(profiler_gui)
|
||||
|
10
README.md
10
README.md
@ -1,4 +1,4 @@
|
||||
# easy_profiler [![1.0.2](https://img.shields.io/badge/version-1.0.2-009688.svg)](https://github.com/yse/easy_profiler/releases)
|
||||
# easy_profiler [![1.0.3](https://img.shields.io/badge/version-1.0.3-009688.svg)](https://github.com/yse/easy_profiler/releases)
|
||||
|
||||
[![Build Status](https://travis-ci.org/yse/easy_profiler.svg?branch=develop)](https://travis-ci.org/yse/easy_profiler)
|
||||
|
||||
@ -47,7 +47,7 @@ For linking with easy_profiler you can specify path to library.
|
||||
|
||||
### Build with cmake
|
||||
|
||||
If you are using `cmake` set `CMAKE_PREFIX_PATH` to `cmake/easy_profiler` directory (from [release](https://github.com/yse/easy_profiler/releases) package) and use function `find_package(easy_profiler)` with `target_link_libraries(... easy_profiler)`. Don't forget to define macro `BUILD_WITH_EASY_PROFILER`. Example:
|
||||
If you are using `cmake` set `CMAKE_PREFIX_PATH` to `lib/cmake/easy_profiler` directory (from [release](https://github.com/yse/easy_profiler/releases) package) and use function `find_package(easy_profiler)` with `target_link_libraries(... easy_profiler)`. Example:
|
||||
|
||||
``` cmake
|
||||
project(app_for_profiling)
|
||||
@ -56,13 +56,9 @@ set(SOURCES
|
||||
main.cpp
|
||||
)
|
||||
|
||||
#CMAKE_PREFIX_PATH should be set to <easy_profiler-release_dir>/cmake/easy_profiler
|
||||
#CMAKE_PREFIX_PATH should be set to <easy_profiler-release_dir>/lib/cmake/easy_profiler
|
||||
find_package(easy_profiler REQUIRED)
|
||||
|
||||
add_definitions(
|
||||
-DBUILD_WITH_EASY_PROFILER
|
||||
)
|
||||
|
||||
add_executable(app_for_profiling ${SOURCES})
|
||||
|
||||
target_link_libraries(app_for_profiling easy_profiler)
|
||||
|
@ -188,7 +188,7 @@ target_link_libraries(${LIB_NAME} ${PLATFORM_LIBS})
|
||||
|
||||
####
|
||||
# Installation
|
||||
set(config_install_dir "cmake/${PROJECT_NAME}")
|
||||
set(config_install_dir "lib/cmake/${PROJECT_NAME}")
|
||||
set(include_install_dir "include")
|
||||
|
||||
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
@ -251,3 +251,4 @@ install(
|
||||
DESTINATION "${config_install_dir}"
|
||||
)
|
||||
|
||||
target_compile_definitions(easy_profiler PUBLIC BUILD_WITH_EASY_PROFILER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user