diff --git a/CMakeLists.txt b/CMakeLists.txt index 3447040..2b582c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index 28a61a5..e0e39b8 100644 --- a/README.md +++ b/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 /cmake/easy_profiler +#CMAKE_PREFIX_PATH should be set to /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) diff --git a/easy_profiler_core/CMakeLists.txt b/easy_profiler_core/CMakeLists.txt index 15c9014..ee8988d 100644 --- a/easy_profiler_core/CMakeLists.txt +++ b/easy_profiler_core/CMakeLists.txt @@ -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)