0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-31 02:49:13 +08:00
easy_profiler/src/CMakeLists.txt

63 lines
1.1 KiB
CMake
Raw Normal View History

2016-02-16 23:21:12 +03:00
project(easy_profiler)
# 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
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
event_trace_win.h
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
-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"
)