From 4cbc2e15516ce5053c2cbd5566fe44c18898e136 Mon Sep 17 00:00:00 2001 From: Oliver Daniell Date: Thu, 10 Aug 2017 09:29:55 +0100 Subject: [PATCH 1/4] Moved bin from the source tree to the build tree --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 223eed2..1e26637 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,9 +8,9 @@ set(EASY_PROGRAM_VERSION_MINOR 3) set(EASY_PROGRAM_VERSION_PATCH 0) set(EASY_PRODUCT_VERSION_STRING "${EASY_PROGRAM_VERSION_MAJOR}.${EASY_PROGRAM_VERSION_MINOR}.${EASY_PROGRAM_VERSION_PATCH}") -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin) -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) # set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/sdk) From 36bade193924c840c5c603667c169c7832256afe Mon Sep 17 00:00:00 2001 From: Oliver Daniell Date: Thu, 10 Aug 2017 09:41:31 +0100 Subject: [PATCH 2/4] Replaced custom Shared/Static lib option with the deafult cmake option --- easy_profiler_core/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easy_profiler_core/CMakeLists.txt b/easy_profiler_core/CMakeLists.txt index ed31c86..2d17f65 100644 --- a/easy_profiler_core/CMakeLists.txt +++ b/easy_profiler_core/CMakeLists.txt @@ -8,7 +8,7 @@ set(EASY_OPTION_PROFILE_SELF OFF CACHE BOOL "Enable self profilin set(EASY_OPTION_PROFILE_SELF_BLOCKS_ON OFF CACHE BOOL "Storage expand default status (profiler::ON or profiler::OFF)") set(EASY_OPTION_LOG OFF CACHE BOOL "Print errors to stderr") set(EASY_OPTION_PREDEFINED_COLORS ON CACHE BOOL "Use predefined set of colors (see profiler_colors.h). If you want to use your own colors palette you can turn this option OFF") -set(EASY_OPTION_LIB_STATIC OFF CACHE BOOL "Build easy_profiler as static library.") +set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build easy_profiler as static library.") if (WIN32) set(EASY_OPTION_EVENT_TRACING ON CACHE BOOL "Enable event tracing by default") set(EASY_OPTION_LOW_PRIORITY_EVENT_TRACING ON CACHE BOOL "Set low priority for event tracing thread") @@ -43,7 +43,7 @@ if (WIN32) endif (WIN32) message(STATUS " Log messages = ${EASY_OPTION_LOG}") message(STATUS " Use EasyProfiler colors palette = ${EASY_OPTION_PREDEFINED_COLORS}") -if (EASY_OPTION_LIB_STATIC) +if (BUILD_SHARED_LIBS) set(EASY_OPTION_LIB_TYPE STATIC) else () set(EASY_OPTION_LIB_TYPE SHARED) @@ -87,7 +87,7 @@ set(SOURCES ${INCLUDE_FILES} ) -add_library(easy_profiler ${EASY_OPTION_LIB_TYPE} ${SOURCES} resources.rc) +add_library(easy_profiler ${SOURCES} resources.rc) target_include_directories(easy_profiler PUBLIC $ $ # /include From a02cfa925a4fb1962497f394a32d3fc3954bd222 Mon Sep 17 00:00:00 2001 From: Oliver Daniell Date: Thu, 10 Aug 2017 11:24:21 +0100 Subject: [PATCH 3/4] message BUILD_SHARED_LIBS directly --- easy_profiler_core/CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/easy_profiler_core/CMakeLists.txt b/easy_profiler_core/CMakeLists.txt index 2d17f65..bddcfa2 100644 --- a/easy_profiler_core/CMakeLists.txt +++ b/easy_profiler_core/CMakeLists.txt @@ -43,12 +43,7 @@ if (WIN32) endif (WIN32) message(STATUS " Log messages = ${EASY_OPTION_LOG}") message(STATUS " Use EasyProfiler colors palette = ${EASY_OPTION_PREDEFINED_COLORS}") -if (BUILD_SHARED_LIBS) - set(EASY_OPTION_LIB_TYPE STATIC) -else () - set(EASY_OPTION_LIB_TYPE SHARED) -endif () -message(STATUS " Library type: ${EASY_OPTION_LIB_TYPE}") +message(STATUS " Shared library: ${BUILD_SHARED_LIBS}") message(STATUS "------ END EASY_PROFILER OPTIONS -------") message(STATUS "") From a03ec76322663d9532106aef4c9e8ed4b5436da1 Mon Sep 17 00:00:00 2001 From: Oliver Daniell Date: Thu, 10 Aug 2017 12:22:59 +0100 Subject: [PATCH 4/4] set BUILD_SHARED_LIBS to ON by default. Updated comment --- easy_profiler_core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_profiler_core/CMakeLists.txt b/easy_profiler_core/CMakeLists.txt index bddcfa2..41c0533 100644 --- a/easy_profiler_core/CMakeLists.txt +++ b/easy_profiler_core/CMakeLists.txt @@ -8,7 +8,7 @@ set(EASY_OPTION_PROFILE_SELF OFF CACHE BOOL "Enable self profilin set(EASY_OPTION_PROFILE_SELF_BLOCKS_ON OFF CACHE BOOL "Storage expand default status (profiler::ON or profiler::OFF)") set(EASY_OPTION_LOG OFF CACHE BOOL "Print errors to stderr") set(EASY_OPTION_PREDEFINED_COLORS ON CACHE BOOL "Use predefined set of colors (see profiler_colors.h). If you want to use your own colors palette you can turn this option OFF") -set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build easy_profiler as static library.") +set(BUILD_SHARED_LIBS ON CACHE BOOL "Build easy_profiler as shared library.") if (WIN32) set(EASY_OPTION_EVENT_TRACING ON CACHE BOOL "Enable event tracing by default") set(EASY_OPTION_LOW_PRIORITY_EVENT_TRACING ON CACHE BOOL "Set low priority for event tracing thread")