From 812f00eb81158bfb4c2d61b228c0c1c796641ac1 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 8 Feb 2022 16:33:30 +0100 Subject: [PATCH] refactor(build): link rainbow statically --- libraries/rainbow/CMakeLists.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libraries/rainbow/CMakeLists.txt b/libraries/rainbow/CMakeLists.txt index 833538e3..6264ca71 100644 --- a/libraries/rainbow/CMakeLists.txt +++ b/libraries/rainbow/CMakeLists.txt @@ -8,15 +8,10 @@ set(RAINBOW_SOURCES src/rainbow.cpp ) -add_definitions(-DRAINBOW_LIBRARY) -add_library(Launcher_rainbow SHARED ${RAINBOW_SOURCES}) -target_include_directories(Launcher_rainbow PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") +add_library(Launcher_rainbow ${RAINBOW_SOURCES}) +target_compile_definitions(Launcher_rainbow PRIVATE RAINBOW_LIBRARY) +target_compile_definitions(Launcher_rainbow PRIVATE RAINBOW_STATIC) +target_include_directories(Launcher_rainbow PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}") target_link_libraries(Launcher_rainbow Qt5::Core Qt5::Gui) -# Install it -install( - TARGETS Launcher_rainbow - RUNTIME DESTINATION ${LIBRARY_DEST_DIR} - LIBRARY DESTINATION ${LIBRARY_DEST_DIR} -)