Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake function find_package() does not find fCWT-config.cmake configuration files #57

Open
VladislavMasl opened this issue Jan 26, 2024 · 1 comment

Comments

@VladislavMasl
Copy link

Thanks to the authors for the opportunity to use this library!

I have a little problem: i installed the fCWT library following the instructions from this official repository, And in the Ubuntu default path /usr/local/share/fcwt/cmake the configuration files fCWT-config.cmake and fCWT-config-release.cmake are present. However, when using the find_package(fCWT REQUIRED)` function in a QT Creator build together with CMakeLists.txt, CMake gives an error:

CMakeLists.txt:14: error: By not providing "FindfCWT.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "fCWT", but CMake did not find one. Could not find a package configuration file provided by "fCWT" with any of the following names:

fCWTConfig.cmake
fcwt-config.cmake

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

I've tried specifying the path to the configuration files using CMake commands but they don't bring success:

set (CMAKE_MODULE_PATH fCWT-config.cmake REQUIRED)
set (CMAKE_PREFIX_PATH /usr/local/share/fcwt/cmake/fCWT-config.cmake REQUIRED)
set (fCWT-config.cmake_DIR = /usr/local/share/fcwt/cmake/ REQUIRED)
list(APPEND CMAKE_SYSTEM_PREFIX_PATH /usr/local/share/fcwt/cmake)

listing them before find_package(fCWT REQUIRED)

This seems strange to me because it finds the other library (GSL) I use in my small project. My CMakeLists.txt looks like this:

cmake_minimum_required(VERSION 3.22)

project(fft LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(GSL REQUIRED)
find_package(fCWT REQUIRED)

include_directories(${GSL_INCLUDE_DIR})
include_directories(${fCWT_INCLUDE_DIR})
include_directories(/lib/include)
include_directories(/usr/local/include)

add_executable(fft main.cpp)
target_link_libraries(fft PRIVATE ${GSL_LIBRARY})
target_link_libraries(fft PRIVATE ${fCWT_LIBRARY})

Thank you for paying attention to my question. I will be glad to receive any advice on how to fix this error.

@myprojcts
Copy link

The issue was resolved by renaming the configuration file "fCWT-config.cmake" to "fCWTConfig.cmake".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants