[evolution] Place private libevolutiontestsettings.so into a test-gio-modules subdirectory



commit b5bca7a05c986195bea11a2b0320928bbbdf0bd5
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 13 18:21:25 2016 +0200

    Place private libevolutiontestsettings.so into a test-gio-modules subdirectory
    
    Thus when the test-html-editor-units loads modules it uses that
    subdirectory and doesn't try to load libevolution-util.so with
    a result as an error that a 'g_io_module_load' symbol couldn't be
    found in this library.

 src/e-util/CMakeLists.txt |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/src/e-util/CMakeLists.txt b/src/e-util/CMakeLists.txt
index ab25ae6..7319810 100644
--- a/src/e-util/CMakeLists.txt
+++ b/src/e-util/CMakeLists.txt
@@ -647,12 +647,28 @@ install(FILES ${HEADERS}
 
 # Private gsettings module
 
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test-gio-modules
+       COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/test-gio-modules
+)
+
+add_custom_target(test-gio-modules-dir
+       DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/test-gio-modules
+)
+
 # This is not meant to be distributed to end users, unless test-html-editor-units
 # is also distributed, but even then it can work without it
 add_library(evolutiontestsettings MODULE
        test-keyfile-settings-backend.h
        test-keyfile-settings-backend.c
-       ${PLATFORM_SOURCES}
+)
+
+add_dependencies(evolutiontestsettings
+       test-gio-modules-dir
+)
+
+set_target_properties(evolutiontestsettings PROPERTIES
+       PREFIX ""
+       OUTPUT_NAME test-gio-modules/libevolutiontestsettings
 )
 
 target_compile_definitions(evolutiontestsettings PRIVATE
@@ -700,7 +716,7 @@ macro(add_private_program _name _sources)
                -DG_LOG_DOMAIN=\"${_name}\"
                -DEVOLUTION_LOCALEDIR=\"${LOCALE_INSTALL_DIR}\"
                -DEVOLUTION_MODULEDIR=\"${moduledir}\"
-               -DEVOLUTION_TESTGIOMODULESDIR=\"${CMAKE_CURRENT_BINARY_DIR}\"
+               -DEVOLUTION_TESTGIOMODULESDIR=\"${CMAKE_CURRENT_BINARY_DIR}/test-gio-modules\"
                -DEVOLUTION_TESTTOPSRCDIR=\"${CMAKE_SOURCE_DIR}\"
                -DLIBEUTIL_COMPILATION
        )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]