From 16bda19cc87b5064daad9955f0ebb5ac5be7dec7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 4 May 2012 22:15:45 +0300 Subject: [PATCH] Move some install location assignments to more logical places --- source/binary.cpp | 7 ------- source/executable.cpp | 4 +++- source/sharedlibrary.cpp | 9 ++++++++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/source/binary.cpp b/source/binary.cpp index b8445c1..b3f0184 100644 --- a/source/binary.cpp +++ b/source/binary.cpp @@ -18,13 +18,6 @@ Binary::Binary(Builder &b, const Component &c, const list &objs): { for(list::const_iterator i=objs.begin(); i!=objs.end(); ++i) add_depend(*i); - - if(c.get_type()==Component::LIBRARY) - install_location = "lib"; - else if(c.get_type()==Component::MODULE) - install_location = "lib/"+package->get_name(); - else if(c.get_type()==Component::PROGRAM) - install_location = "bin"; } void Binary::find_depends() diff --git a/source/executable.cpp b/source/executable.cpp index 4758d5f..039267a 100644 --- a/source/executable.cpp +++ b/source/executable.cpp @@ -5,4 +5,6 @@ Executable::Executable(Builder &b, const Component &c, const std::list &objs): FileTarget(b, &c.get_package(), generate_target_path(c)), Binary(b, c, objs) -{ } +{ + install_location = "bin"; +} diff --git a/source/sharedlibrary.cpp b/source/sharedlibrary.cpp index 6a197ba..fac651a 100644 --- a/source/sharedlibrary.cpp +++ b/source/sharedlibrary.cpp @@ -12,7 +12,14 @@ SharedLibrary::SharedLibrary(Builder &b, const Component &c, const listget_name(); + } +} string SharedLibrary::create_soname(const Component &c) { -- 2.43.0