mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-21 14:16:08 +00:00
Use Graphviz as Target (#1701)
This commit is contained in:
parent
330795a650
commit
9c1f4e6a34
@ -107,14 +107,14 @@ find_package(PkgConfig REQUIRED)
|
|||||||
|
|
||||||
if (CUTTER_ENABLE_GRAPHVIZ)
|
if (CUTTER_ENABLE_GRAPHVIZ)
|
||||||
if (CUTTER_ENABLE_GRAPHVIZ STREQUAL AUTO)
|
if (CUTTER_ENABLE_GRAPHVIZ STREQUAL AUTO)
|
||||||
pkg_check_modules(GVC libgvc)
|
pkg_check_modules(GVC IMPORTED_TARGET libgvc)
|
||||||
if (GVC_FOUND)
|
if (GVC_FOUND)
|
||||||
set(CUTTER_ENABLE_GRAPHVIZ ON)
|
set(CUTTER_ENABLE_GRAPHVIZ ON)
|
||||||
else()
|
else()
|
||||||
set(CUTTER_ENABLE_GRAPHVIZ OFF)
|
set(CUTTER_ENABLE_GRAPHVIZ OFF)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
pkg_check_modules(GVC REQUIRED libgvc)
|
pkg_check_modules(GVC REQUIRED IMPORTED_TARGET libgvc)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -174,9 +174,7 @@ add_executable(Cutter MACOSX_BUNDLE ${UI_FILES} ${QRC_FILES} ${SOURCE_FILES} ${H
|
|||||||
set_target_properties(Cutter PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist")
|
set_target_properties(Cutter PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist")
|
||||||
|
|
||||||
if (CUTTER_ENABLE_GRAPHVIZ)
|
if (CUTTER_ENABLE_GRAPHVIZ)
|
||||||
target_link_libraries(Cutter ${GVC_LIBRARIES})
|
target_link_libraries(Cutter PkgConfig::GVC)
|
||||||
target_include_directories(Cutter PUBLIC ${GVC_INCLUDE_DIRS})
|
|
||||||
target_compile_options(Cutter PUBLIC ${GVC_CFLAGS_OTHER})
|
|
||||||
target_compile_definitions(Cutter PRIVATE CUTTER_ENABLE_GRAPHVIZ)
|
target_compile_definitions(Cutter PRIVATE CUTTER_ENABLE_GRAPHVIZ)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user