From 0732682fc00bf484d5ec5375ca1bdfd4e481dd9f Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 7 Oct 2020 20:12:23 +0300 Subject: [PATCH] Try to fix the need for LD_LIBRARY_PATH. Patch based on an earlier one by Mc. @shlomif puts all his changes under CC0 / MITL / LGPLv2+ / GPLv2+ . The problem is that we needes to set LD_LIBRARY_PATH to contain /opt/inkscape-trunk/lib/ or similar before running: /opt/inkscape-trunk/bin/inkscape ~/Download/Images/Art/Computer/test1.svg or similar. --- src/CMakeLists.txt | 3 ++- testfiles/CMakeLists.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5cf1a2e8aa..d45c48c436 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -381,13 +381,14 @@ target_link_libraries(inkscape_base PUBLIC Boost::filesystem) target_link_libraries(inkscape_base PRIVATE ${INKSCAPE_TARGET_LIBS} - PUBLIC 2Geom::2geom + INTERFACE ${INKSCAPE_LIBS} ) # Link inkscape and inkview against inkscape_base target_link_libraries(inkscape inkscape_base) +target_include_directories(inkscape PRIVATE 3rdparty/2geom/include) target_link_libraries(inkview inkscape_base) if(WIN32) target_link_libraries(inkscape_com inkscape_base) diff --git a/testfiles/CMakeLists.txt b/testfiles/CMakeLists.txt index 7d4627edaf..72a06aa819 100644 --- a/testfiles/CMakeLists.txt +++ b/testfiles/CMakeLists.txt @@ -78,6 +78,7 @@ set(TEST_SOURCES sp-item-group-test) add_library(cpp_test_static_library SHARED unittest.cpp doc-per-case-test.cpp) +target_include_directories(cpp_test_static_library PUBLIC "${CMAKE_SOURCE_DIR}/src/3rdparty/2geom/include") target_link_libraries(cpp_test_static_library PUBLIC ${GTEST_LIBRARIES} inkscape_base) add_custom_target(tests) @@ -85,7 +86,7 @@ foreach(test_source ${TEST_SOURCES}) string(REPLACE "-test" "" testname "test_${test_source}") add_executable(${testname} src/${test_source}.cpp) target_include_directories(${testname} SYSTEM PRIVATE ${GTEST_INCLUDE_DIRS}) - target_link_libraries(${testname} cpp_test_static_library) + target_link_libraries(${testname} cpp_test_static_library 2Geom::2geom) add_test(NAME ${testname} COMMAND ${testname}) set_tests_properties(${testname} PROPERTIES ENVIRONMENT "${INKSCAPE_TEST_PROFILE_DIR_ENV}/${testname};${CMAKE_CTEST_ENV}") add_dependencies(tests ${testname}) -- GitLab