TianZerL / Anime4KCPP

A high performance anime upscaler
GNU General Public License v3.0
1.82k stars 139 forks source link

CMake Error at cmake/ThirdPartyForGUI.cmake:1 (find_package) #43

Closed arupakafreemail closed 4 years ago

arupakafreemail commented 4 years ago

Hi Author,

I'm on macOS Catalina and followed all instructions, and now trying to install the cmake GUI with the command cmake -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" .. However, the following error occured:

`Demos-MacBook-Pro:Anime4KCPP-2 demo$ cmake -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" . -- No CMAKE_BUILD_TYPE selected, defaulting to Release

CMake Error at cmake/ThirdPartyForGUI.cmake:1 (find_package): By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one.

Could not find a package configuration file provided by "Qt5" with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing one of the above files. If "Qt5" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): GUI/CMakeLists.txt:37 (include)

-- Configuring incomplete, errors occurred! See also "/Users/demo/Anime4KCPP-2/CMakeFiles/CMakeOutput.log". See also "/Users/demo/Anime4KCPP-2/CMakeFiles/CMakeError.log". Demos-MacBook-Pro:Anime4KCPP-2 demo$ `

Please let me know if I've missed any steps or if any further information is needed to solve the issue.

Thanks in advance!

Regards, Arupaka

TianZerL commented 4 years ago

You need install Qt5 first and add it to environment variable, see wiki

arupakafreemail commented 4 years ago

Hi TianZerL,

Thank you so much for your prompt reply.

I believe I've installed Qt5 already by verifying with the command brew info qt as illustrated in the following image:

Screen Shot 2020-09-14 at 5 34 33 PM

I've also added it to environment variable as illustrated in the following image:

Screen Shot 2020-09-14 at 5 34 53 PM

However, as I run the line cmake -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" . it still gives me the same error as below:

Screen Shot 2020-09-14 at 5 35 04 PM

Did I install the Qt5 wrongly or missed any steps? Thanks in advance!

TianZerL commented 4 years ago

Try

cmake -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" -DQt5_DIR="/usr/local/opt/qt/lib/cmake/Qt5" ..

You may need to reboot your mac to ensure that the environment variables are in effect. In Linux we can run source ~/.profile to do it, but I am not sure it in macos.
And I think in macos, ~/.profile should be ~/.zshrc or ~/.bashrc which depends on your terminal, please check it out.

arupakafreemail commented 4 years ago

Hi TianZerL,

Thanks again for your prompt reply.

I've just gave it a try with your line of code cmake -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" -DQt5_DIR="/usr/local/opt/qt/lib/cmake/Qt5" and it successfully compiled without error! (Thanks!!!)

Screen Shot 2020-09-14 at 5 59 26 PM

I've then ran make and believe that Anime4KCPP_GUI has been successfully installed (?):

Screen Shot 2020-09-14 at 5 56 41 PM

If it is in fact successfully installed, I wonder how am I supposed to open the GUI...... sorry for such a stupid question, I'm a complete newbie to this lol.

Thanks in advance!

TianZerL commented 4 years ago

Your GUI executable file is in the bin folder in your CMake build folder, just double click it to open it.

arupakafreemail commented 4 years ago

I MADE IT TianZerL!!!!!

Screen Shot 2020-09-14 at 6 19 31 PM

Thank you so much for your help and for your time!!!!! Wish you and Anime4KCPP all the best!!! hahaa

Please have a good day!!!

Regards, Arupaka