diff options
| author | Guido Berhoerster <guido+freiesoftware@berhoerster.name> | 2023-03-24 14:49:40 +0100 |
|---|---|---|
| committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2026-06-10 09:56:51 +0200 |
| commit | 2ea7c4ae2e9c93d698f4d9065ebd5a49904720c6 (patch) | |
| tree | 476650610c8b7acf84ca0b706973aa416ae76025 /bindings/vala | |
| parent | 0a1de62141772e44813a39a36f659d49a54c2e4b (diff) | |
| download | libayatana-appindicator-2ea7c4ae2e9c93d698f4d9065ebd5a49904720c6.tar.gz libayatana-appindicator-2ea7c4ae2e9c93d698f4d9065ebd5a49904720c6.tar.bz2 libayatana-appindicator-2ea7c4ae2e9c93d698f4d9065ebd5a49904720c6.zip | |
Use symlink in the build directory for includes
Make includes work though a symlink rather than modifying the generated
sources. This is necessary so that headers included from the main header work.
Diffstat (limited to 'bindings/vala')
| -rw-r--r-- | bindings/vala/examples/CMakeLists.txt | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bindings/vala/examples/CMakeLists.txt b/bindings/vala/examples/CMakeLists.txt index 2751096..cb869d3 100644 --- a/bindings/vala/examples/CMakeLists.txt +++ b/bindings/vala/examples/CMakeLists.txt @@ -4,6 +4,7 @@ add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-example.c" DEPENDS "bindings-vala" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/src" "${CMAKE_CURRENT_BINARY_DIR}/libayatana-appindicator" COMMAND ${VALA_COMPILER} --pkg ayatana-appindicator3-0.1 @@ -12,16 +13,11 @@ add_custom_command( -C ayatana-indicator-example.vala --metadatadir "${CMAKE_SOURCE_DIR}/src" --directory=${CMAKE_CURRENT_BINARY_DIR} - VERBATIM - COMMAND - sed - -i "s|#include\\s*<\\s*libayatana-appindicator/app-indicator.h\\s*>||g" - "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-example.c" ) # ayatana-indicator-example -set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-example.c" PROPERTIES COMPILE_FLAGS " -include ${CMAKE_SOURCE_DIR}/src/app-indicator.h -Wno-incompatible-pointer-types") +set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-example.c" PROPERTIES COMPILE_FLAGS " -Wno-incompatible-pointer-types") add_executable("ayatana-indicator-example" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-example.c") -target_include_directories("ayatana-indicator-example" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) +target_include_directories("ayatana-indicator-example" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries("ayatana-indicator-example" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3 -L${CMAKE_BINARY_DIR}/src") |
