diff options
author | Aleksei Vereshchagin <avereschagin@dev.rtsoft.ru> | 2018-08-08 20:08:40 +0300 |
---|---|---|
committer | Petr Bred/AI Ecosystem Lab /SRR/Staff Engineer/삼성전자 <p.bred@samsung.com> | 2018-08-20 19:36:12 +0300 |
commit | 46d6b25c11afcf8dbb9bb54ee029bd0964388083 (patch) | |
tree | 30079dd003a926958b0996b56fa20eb7776fd8ff | |
parent | eb1042a377b8eaebf7501ca21baf32a9a5a628a6 (diff) | |
download | heaptrack-46d6b25c11afcf8dbb9bb54ee029bd0964388083.tar.gz heaptrack-46d6b25c11afcf8dbb9bb54ee029bd0964388083.tar.bz2 heaptrack-46d6b25c11afcf8dbb9bb54ee029bd0964388083.zip |
Change installation path in spec-file
-rw-r--r-- | packaging/heaptrack.spec | 57 | ||||
-rw-r--r-- | profiler/profiler/CMakeLists.txt | 2 | ||||
-rw-r--r-- | profiler/profiler/src/CMakeLists.txt | 4 |
3 files changed, 28 insertions, 35 deletions
diff --git a/packaging/heaptrack.spec b/packaging/heaptrack.spec index eff6c5f..704ad9d 100644 --- a/packaging/heaptrack.spec +++ b/packaging/heaptrack.spec @@ -30,6 +30,8 @@ BuildRequires: coreclr-devel %define dotnettizendir dotnet.tizen %define netcoreappdir %{dotnettizendir}/netcoreapp +%define sdk_install_prefix /home/owner/share/tmp/sdk_tools/%{name} + %description Heaptrack for Tizen applications @@ -56,11 +58,15 @@ export CXXFLAGS="--target=%{_host}" %define _heaptrack_build_conf RelWithDebInfo %define _coreclr_devel_directory %{_datarootdir}/%{netcoreappdir} +mkdir build +cd build cmake \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_PREFIX=install \ -DCMAKE_BUILD_TYPE=%{_heaptrack_build_conf} \ -DHEAPTRACK_BUILD_GUI=OFF \ - . + .. + +make %{?jobs:-j%jobs} VERBOSE=1 %ifarch %{arm} %define arch_dir armel @@ -68,38 +74,27 @@ cmake \ %define arch_dir x86 %endif -cd profiler; - ROOTFS_DIR=/ \ - CC=clang CXX=clang++ \ - cmake \ - -DCMAKE_TOOLCHAIN_FILE=profiler/cross/%{arch_dir}/toolchain.cmake \ - -DCLR_BIN_DIR=%{_coreclr_devel_directory} \ - -DCLR_SRC_DIR=%{_coreclr_devel_directory} \ - -DCLR_ARCH=%{_target_cpu} \ - profiler \ - ; \ - make +cd ../profiler +ROOTFS_DIR=/ \ +CC=clang CXX=clang++ \ +cmake \ + -DCMAKE_INSTALL_PREFIX=../build/install \ + -DCMAKE_TOOLCHAIN_FILE=profiler/cross/%{arch_dir}/toolchain.cmake \ + -DCLR_BIN_DIR=%{_coreclr_devel_directory} \ + -DCLR_SRC_DIR=%{_coreclr_devel_directory} \ + -DCLR_ARCH=%{_target_cpu} \ + profiler +make cd - -make %{?jobs:-j%jobs} VERBOSE=1 - %install -rm -rf %{buildroot} -%make_install - -#mkdir -p %{buildroot}%{_native_lib_dir} -#ln -sf %{_libdir}/libheaptrack_preload.so.1 %{buildroot}%{_native_lib_dir}/libheaptrack_preload.so -#ln -sf %{_libdir}/libheaptrack_inject.so.1 %{buildroot}%{_native_lib_dir}/libheaptrack_inject.so - -pwd -cp profiler/src/libprofiler.so %{buildroot}%{_prefix}/lib/heaptrack/libprofiler.so -echo %{buildroot} -ls %{buildroot} -echo %{_prefix} +cd build +make install +make -C ../profiler install +mkdir -p %{buildroot}%{sdk_install_prefix} +cp install/lib/heaptrack/*.so %{buildroot}%{sdk_install_prefix} +cp install/lib/heaptrack/libexec/* %{buildroot}%{sdk_install_prefix} %files %manifest heaptrack.manifest -%{_prefix}/lib/heaptrack/libheaptrack_preload.so* -%{_prefix}/lib/heaptrack/libheaptrack_inject.so* -%{_prefix}/lib/heaptrack/libprofiler.so -%{_prefix}/lib/heaptrack/libexec/heaptrack_interpret +%{sdk_install_prefix}/* diff --git a/profiler/profiler/CMakeLists.txt b/profiler/profiler/CMakeLists.txt index 4a03548..e8f79a9 100644 --- a/profiler/profiler/CMakeLists.txt +++ b/profiler/profiler/CMakeLists.txt @@ -2,10 +2,8 @@ cmake_minimum_required(VERSION 2.8.12.2) project(profiler) -set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -g -std=c++11") add_subdirectory( src ) - diff --git a/profiler/profiler/src/CMakeLists.txt b/profiler/profiler/src/CMakeLists.txt index adb7fe0..68b27ef 100644 --- a/profiler/profiler/src/CMakeLists.txt +++ b/profiler/profiler/src/CMakeLists.txt @@ -23,7 +23,7 @@ set(PROFILER_SOURCES set(CLR_INCLUDES ${CLR_SRC_DIR}/src/pal/inc/rt ${CLR_SRC_DIR}/src/pal/prebuilt/inc - ${CLR_SRC_DIR}/src/pal/inc + ${CLR_SRC_DIR}/src/pal/inc ${CLR_SRC_DIR}/src/inc ${CLR_BIN_DIR}/inc) include_directories(AFTER ${CLR_INCLUDES}) @@ -31,4 +31,4 @@ include_directories(AFTER ${CLR_INCLUDES}) add_library(profiler SHARED ${PROFILER_SOURCES}) target_link_libraries(profiler ${PROFILER_LIBRARIES}) -install(TARGETS profiler DESTINATION lib) +install(TARGETS profiler DESTINATION lib/heaptrack) |