From 2344ee2dcd2c0f8755257ed092ccb652b4733330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 28 Dec 2016 17:23:48 +0100 Subject: [PATCH] GH-1379 rename shared libraries to avoid collisions with system libraries It was unlikely, now it's impossible. --- CMakeLists.txt | 1 + api/logic/CMakeLists.txt | 2 +- application/CMakeLists.txt | 2 +- libraries/rainbow/CMakeLists.txt | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52268530..69827ee1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,7 @@ endif() option(NBT_BUILD_SHARED "Build NBT shared library" ON) option(NBT_USE_ZLIB "Build NBT library with zlib support" OFF) option(NBT_BUILD_TESTS "Build NBT library tests" OFF) #FIXME: fix unit tests. +set(NBT_NAME MultiMC_nbt++) add_subdirectory(libraries/libnbtplusplus) add_subdirectory(libraries/ganalytics) # google analytics library diff --git a/api/logic/CMakeLists.txt b/api/logic/CMakeLists.txt index 1af3bb71..02e9afbe 100644 --- a/api/logic/CMakeLists.txt +++ b/api/logic/CMakeLists.txt @@ -491,7 +491,7 @@ set_target_properties(MultiMC_logic PROPERTIES CXX_VISIBILITY_PRESET hidden VISI generate_export_header(MultiMC_logic) # Link -target_link_libraries(MultiMC_logic xz-embedded unpack200 ${QUAZIP_LIBRARIES} nbt++ ${ZLIB_LIBRARIES}) +target_link_libraries(MultiMC_logic xz-embedded unpack200 ${QUAZIP_LIBRARIES} ${NBT_NAME} ${ZLIB_LIBRARIES}) qt5_use_modules(MultiMC_logic Core Xml Network Concurrent) add_dependencies(MultiMC_logic QuaZIP) diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index 2e2992cf..2cf6b3b5 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -333,7 +333,7 @@ qt5_add_resources(MULTIMC_RESOURCES ${MULTIMC_QRCS}) # Add executable add_executable(MultiMC MACOSX_BUNDLE WIN32 ${MULTIMC_SOURCES} ${MULTIMC_UI} ${MULTIMC_RESOURCES} ${MULTIMC_RCS}) -target_link_libraries(MultiMC MultiMC_gui ${QUAZIP_LIBRARIES} hoedown rainbow LocalPeer ganalytics) +target_link_libraries(MultiMC MultiMC_gui ${QUAZIP_LIBRARIES} hoedown MultiMC_rainbow LocalPeer ganalytics) if(APPLE) find_library(OSX_CORE_FOUNDATION CoreFoundation) diff --git a/libraries/rainbow/CMakeLists.txt b/libraries/rainbow/CMakeLists.txt index 01342d1b..15019a71 100644 --- a/libraries/rainbow/CMakeLists.txt +++ b/libraries/rainbow/CMakeLists.txt @@ -9,7 +9,7 @@ src/rainbow.cpp ) add_definitions(-DRAINBOW_LIBRARY) -add_library(rainbow SHARED ${RAINBOW_SOURCES}) -target_include_directories(rainbow PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") +add_library(MultiMC_rainbow SHARED ${RAINBOW_SOURCES}) +target_include_directories(MultiMC_rainbow PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") -qt5_use_modules(rainbow Core Gui) +qt5_use_modules(MultiMC_rainbow Core Gui)