mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 16:11:02 +08:00
Merge pull request #58 from oliverdaniell/fix/cmake
Moved bin from the source tree to the build tree
This commit is contained in:
commit
6f447be33d
@ -8,9 +8,9 @@ set(EASY_PROGRAM_VERSION_MINOR 3)
|
|||||||
set(EASY_PROGRAM_VERSION_PATCH 0)
|
set(EASY_PROGRAM_VERSION_PATCH 0)
|
||||||
set(EASY_PRODUCT_VERSION_STRING "${EASY_PROGRAM_VERSION_MAJOR}.${EASY_PROGRAM_VERSION_MINOR}.${EASY_PROGRAM_VERSION_PATCH}")
|
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_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||||
|
|
||||||
# set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/sdk)
|
# set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/sdk)
|
||||||
|
|
||||||
|
@ -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_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_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_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 ON CACHE BOOL "Build easy_profiler as shared library.")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(EASY_OPTION_EVENT_TRACING ON CACHE BOOL "Enable event tracing by default")
|
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")
|
set(EASY_OPTION_LOW_PRIORITY_EVENT_TRACING ON CACHE BOOL "Set low priority for event tracing thread")
|
||||||
@ -43,12 +43,7 @@ if (WIN32)
|
|||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
message(STATUS " Log messages = ${EASY_OPTION_LOG}")
|
message(STATUS " Log messages = ${EASY_OPTION_LOG}")
|
||||||
message(STATUS " Use EasyProfiler colors palette = ${EASY_OPTION_PREDEFINED_COLORS}")
|
message(STATUS " Use EasyProfiler colors palette = ${EASY_OPTION_PREDEFINED_COLORS}")
|
||||||
if (EASY_OPTION_LIB_STATIC)
|
message(STATUS " Shared library: ${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 "------ END EASY_PROFILER OPTIONS -------")
|
message(STATUS "------ END EASY_PROFILER OPTIONS -------")
|
||||||
message(STATUS "")
|
message(STATUS "")
|
||||||
|
|
||||||
@ -87,7 +82,7 @@ set(SOURCES
|
|||||||
${INCLUDE_FILES}
|
${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
|
target_include_directories(easy_profiler PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include> # <prefix>/include
|
$<INSTALL_INTERFACE:include> # <prefix>/include
|
||||||
|
Loading…
x
Reference in New Issue
Block a user