From 63e036f11aae385230dd003847fcf88c5fe0b05e Mon Sep 17 00:00:00 2001 From: Sergey Grivskiy Date: Thu, 8 Dec 2016 14:22:14 +0300 Subject: [PATCH] custom core library name (for cross-platform build, like easy_profiler_eabihf), ex: "cmake -DLIB_NAME=easy_profiler_x64 ../easy_profiler_core" --- easy_profiler_core/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/easy_profiler_core/CMakeLists.txt b/easy_profiler_core/CMakeLists.txt index 0252192..b49ff27 100644 --- a/easy_profiler_core/CMakeLists.txt +++ b/easy_profiler_core/CMakeLists.txt @@ -1,5 +1,9 @@ project(easy_profiler) +IF (NOT DEFINED LIB_NAME) + SET(LIB_NAME ${PROJECT_NAME}) +ENDIF() + set(CPP_FILES block.cpp profile_manager.cpp @@ -85,10 +89,10 @@ if(WIN32) ) endif(WIN32) -add_library(${PROJECT_NAME} SHARED ${SOURCES} resources.rc) +add_library(${LIB_NAME} SHARED ${SOURCES} resources.rc) if(UNIX) set(PLATFORM_LIBS pthread) endif(UNIX) -target_link_libraries(${PROJECT_NAME} ${PLATFORM_LIBS}) +target_link_libraries(${LIB_NAME} ${PLATFORM_LIBS})