From 54f929a88323c8dc396e95b0bb6395608bae0a96 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 30 Jun 2017 18:00:10 -0500 Subject: [PATCH] Make NostalgiaStudio library a shared library --- CMakeLists.txt | 3 +++ src/nostalgia/core/studio/CMakeLists.txt | 3 +-- src/nostalgia/studio/lib/CMakeLists.txt | 10 +++------- src/nostalgia/tools/lib/CMakeLists.txt | 5 +++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb92369e..0fcc995d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,9 @@ add_definitions( -Wsign-compare ) +set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib/nostalgia") +set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) + if (CMAKE_BUILD_TYPE STREQUAL "Release") add_definitions( -Werror diff --git a/src/nostalgia/core/studio/CMakeLists.txt b/src/nostalgia/core/studio/CMakeLists.txt index 63e3a925..ebae071f 100644 --- a/src/nostalgia/core/studio/CMakeLists.txt +++ b/src/nostalgia/core/studio/CMakeLists.txt @@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 2.8.11) if(WOMBAT_BUILD_TYPE STREQUAL "Native") add_library( - NostalgiaCore-Studio - SHARED + NostalgiaCore-Studio SHARED import_tilesheet_wizard.cpp plugin.cpp ) diff --git a/src/nostalgia/studio/lib/CMakeLists.txt b/src/nostalgia/studio/lib/CMakeLists.txt index 4c392b46..aa861fa7 100644 --- a/src/nostalgia/studio/lib/CMakeLists.txt +++ b/src/nostalgia/studio/lib/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) add_library( - NostalgiaStudio + NostalgiaStudio SHARED json_read.cpp json_write.cpp wizard.cpp @@ -15,12 +15,8 @@ add_library( project.cpp ) -set_property( - TARGET - NostalgiaStudio - PROPERTY - POSITION_INDEPENDENT_CODE ON -) +install(TARGETS NostalgiaStudio + LIBRARY DESTINATION lib/nostalgia) target_link_libraries( NostalgiaStudio diff --git a/src/nostalgia/tools/lib/CMakeLists.txt b/src/nostalgia/tools/lib/CMakeLists.txt index 3bb7e77c..aa484f5d 100644 --- a/src/nostalgia/tools/lib/CMakeLists.txt +++ b/src/nostalgia/tools/lib/CMakeLists.txt @@ -5,6 +5,7 @@ set(CMAKE_AUTOMOC ON) add_library( NostalgiaTool + SHARED tilesetimport.cpp ) @@ -28,6 +29,6 @@ install( install( TARGETS NostalgiaTool - LIBRARY DESTINATION lib/ox - ARCHIVE DESTINATION lib/ox + LIBRARY DESTINATION lib/nostalgia + ARCHIVE DESTINATION lib/nostalgia )