2016-02-16 23:21:12 +03:00
|
|
|
project(easy_profiler)
|
|
|
|
|
2016-11-16 22:17:39 +03:00
|
|
|
# EasyProfiler version
|
|
|
|
add_definitions(
|
|
|
|
-DEASY_VERSION_MAJOR=1
|
|
|
|
-DEASY_VERSION_MINOR=0
|
|
|
|
-DEASY_VERSION_REV=0
|
|
|
|
)
|
|
|
|
# EasyProfiler version
|
|
|
|
|
2016-02-16 23:21:12 +03:00
|
|
|
set(CPP_FILES
|
2016-09-06 22:23:55 +03:00
|
|
|
block.cpp
|
|
|
|
profile_manager.cpp
|
|
|
|
reader.cpp
|
2016-09-04 14:48:35 +03:00
|
|
|
event_trace_win.cpp
|
2016-09-08 23:34:04 +03:00
|
|
|
easy_socket.cpp
|
2016-02-16 23:21:12 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(H_FILES
|
2016-09-29 23:29:57 +03:00
|
|
|
${ROOT}/include/easy/profiler.h
|
|
|
|
${ROOT}/include/easy/reader.h
|
|
|
|
${ROOT}/include/easy/easy_net.h
|
|
|
|
${ROOT}/include/easy/easy_socket.h
|
2016-09-06 22:23:55 +03:00
|
|
|
profile_manager.h
|
|
|
|
spin_lock.h
|
2016-09-04 14:48:35 +03:00
|
|
|
event_trace_win.h
|
2016-09-26 23:23:38 +03:00
|
|
|
current_time.h
|
2016-02-16 23:21:12 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(SOURCES
|
2016-09-06 22:23:55 +03:00
|
|
|
${CPP_FILES}
|
|
|
|
${H_FILES}
|
2016-02-16 23:21:12 +03:00
|
|
|
)
|
|
|
|
add_definitions(
|
2016-09-06 22:23:55 +03:00
|
|
|
-D_BUILD_PROFILER
|
2016-09-29 23:08:20 +03:00
|
|
|
-DBUILD_WITH_EASY_PROFILER
|
2016-02-16 23:21:12 +03:00
|
|
|
)
|
2016-09-08 21:03:05 +03:00
|
|
|
|
2016-09-20 00:54:56 +03:00
|
|
|
if(WIN32)
|
|
|
|
add_definitions(
|
|
|
|
-D_WINSOCK_DEPRECATED_NO_WARNINGS
|
|
|
|
)
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
|
2016-02-16 23:21:12 +03:00
|
|
|
add_library(${PROJECT_NAME} SHARED ${SOURCES})
|
|
|
|
|
2016-09-09 06:14:34 +03:00
|
|
|
if(UNIX)
|
2016-11-02 22:37:51 +03:00
|
|
|
set(PLATFORM_LIBS pthread)
|
2016-09-09 06:14:34 +03:00
|
|
|
endif(UNIX)
|
2016-09-08 21:03:05 +03:00
|
|
|
|
2016-09-09 06:14:34 +03:00
|
|
|
target_link_libraries(${PROJECT_NAME} ${PLATFORM_LIBS})
|
2016-11-02 22:37:51 +03:00
|
|
|
|
2016-11-13 15:04:00 +03:00
|
|
|
install(TARGETS ${PROJECT_NAME}
|
2016-11-13 17:48:41 +03:00
|
|
|
DESTINATION bin
|
2016-11-02 22:37:51 +03:00
|
|
|
COMPONENT sdk
|
|
|
|
)
|
|
|
|
|
|
|
|
install(DIRECTORY ${ROOT}/include/easy
|
|
|
|
DESTINATION include/
|
|
|
|
COMPONENT sdk
|
|
|
|
FILES_MATCHING PATTERN "*.h"
|
|
|
|
)
|