Skip to content

Commit

Permalink
Find and link Magick++ properly
Browse files Browse the repository at this point in the history
  • Loading branch information
spinicist committed Apr 23, 2024
1 parent 78324c7 commit a40c934
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions cxx/riesling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ option(BUILD_MONTAGE "Build the montage command. Requires ImageMagick" OFF)
if (${BUILD_MONTAGE})
target_sources(riesling PRIVATE util/montage.cpp)
target_compile_definitions(riesling PRIVATE -DBUILD_MONTAGE)
execute_process(COMMAND "Magick++-config" "--cxxflags" OUTPUT_VARIABLE IM_CXX)
execute_process(COMMAND "Magick++-config" "--ldflags" OUTPUT_VARIABLE IM_LD)
string(STRIP ${IM_CXX} IM_CXX)
string(STRIP ${IM_LD} IM_LD)
separate_arguments(IM_CXX)
separate_arguments(IM_LD)
target_compile_options(riesling PRIVATE ${IM_CXX})
target_link_options(riesling PRIVATE ${IM_LD})
find_package(ImageMagick COMPONENTS Magick++ MagickCore)
target_link_libraries(riesling PRIVATE ImageMagick::Magick++ ImageMagick::MagickCore)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(riesling PUBLIC OpenMP::OpenMP_CXX)
endif()
endif()
2 changes: 1 addition & 1 deletion cxx/riesling/util/montage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void main_montage(args::Subparser &parser)

args::ValueFlag<std::string> title(parser, "T", "Title", {"title", 't'});
args::ValueFlag<Magick::GravityType, GravityReader> gravity(parser, "G", "Title gravity", {"gravity"}, Magick::NorthGravity);
args::ValueFlag<std::string> font(parser, "F", "Font", {"font", 'f'}, "Arial");
args::ValueFlag<std::string> font(parser, "F", "Font", {"font", 'f'}, "Helvetica");
args::ValueFlag<float> fontSize(parser, "FS", "Font size", {"font-size"}, 18);

args::ValueFlag<Index> cols(parser, "C", "Output columns", {"cols"}, 8);
Expand Down

0 comments on commit a40c934

Please sign in to comment.