GreycLab / gmic

GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Other
66 stars 11 forks source link

Cmake reports error File Not Found for GmicConfig.cmake #32

Open gstalnaker opened 8 months ago

gstalnaker commented 8 months ago

Attempting to make gmic_qt from source and following cmake build instruction steps:

CMake

cmake works on all platforms. The first part is the same and requires make and wget to be available. If you don't have all dependencies, cmake will warn you which ones are missing. Note that the minimum cmake version is 3.1.

git clone https://github.com/GreycLab/gmic.git
git clone https://github.com/c-koi/gmic-qt.git
make -C gmic/src CImg.h gmic_stdlib_community.h
cd gmic-qt

Then make a build directory:

mkdir build
cd build

cmake .. [-DGMIC_QT_HOST=none|gimp|paintdotnet|8bf] [-DGMIC_PATH=/path/to/gmic] [-DCMAKE_BUILD_TYPE=[Debug|Release|RelwithDebInfo]
make

From Terminal (first was an attempt to put gmic cli app in my local home bin folder, second was an attempt to point cmake at the downloaded source files after the error was displayed:

 1108  1/1/2024 13:13  cmake .. -DGMIC_QT_HOST=none -DGMIC_PATH=/home/guyst/bin/gmic -DCMAKE_BUILD_TYPE=Release
...
 1109  1/1/2024 13:13  cmake .. -DGMIC_QT_HOST=none -DGMIC_PATH=/home/guyst/source/gmic/src/gmic -DCMAKE_BUILD_TYPE=Release

Leads to following error:

CMake Error at CMakeLists.txt:152 (find_package):
  Could not find a package configuration file provided by "Gmic" with any of
  the following names:

    GmicConfig.cmake
    gmic-config.cmake

  Add the installation prefix of "Gmic" to CMAKE_PREFIX_PATH or set
  "Gmic_DIR" to a directory containing one of the above files.  If "Gmic"
  provides a separate development package or SDK, be sure it has been
  installed.

I used find on the source folders and no file with either of those names is included with the source for gmic or gmic-qt downloads. I WAS able to successfully build with qmake after installing a LOT of dependencies, but it did work and is currently installed and functioning.

Thought someone should know.

kuamanet commented 5 months ago

@gstalnaker you need to turn off the flag that searches "globally" in your system for gmic.

cmake .. -DGMIC_QT_HOST=none -DGMIC_PATH=/home/guyst/source/gmic/src/gmic -DCMAKE_BUILD_TYPE=Release -DENABLE_SYSTEM_GMIC=OFF