Stephen
Stephen

Reputation: 11

cmake not finding a configuration file for pdal

I am trying to configure the Point Data Abstraction Library in Windows using CMake. I am following a tutorial that can be found here:

I am using the following command in the command prompt:

C:\Users\name\PDALe\build> cmake .. -DCMAKE_PREFIX_PATH=C:\OSGeo4W64\lib\pdal\cmake 

However, the following warning appears:

CMake Warning at CMakeLists.txt:3 (find_package): Could not find a configuration file for package "PDAL" that is compatible with requested version "1.6.0". The following configuration files were considered but not accepted: C:/OSGeo4W64/lib/pdal/cmake/PDALConfig.cmake, version: 1.6.0 (64bit)

This is exactly the configuration file I want it to use, I'm not sure why it isn't using it. I have seen a similar idea, but I think I have directed cmake to the config file correctly.

Is there something simple I'm missing? Does anyone know what is going wrong here?

Edit: My current CMakeLists.txt is as follows:

cmake_minimum_required(VERSION 2.8)
project(MY_PDAL_PROJECT)
find_package(PDAL REQUIRED CONFIG)
include_directories(${PDAL_INCLUDE_DIRS})
link_directories(${PDAL_LIBRARY_DIRS})
add_definitions(${PDAL_DEFINITIONS})
set(CMAKE_CXX_FLAGS "-std=c++11")
add_executable(tutorial Tutorial.cpp)
target_link_libraries(tutorial PRIVATE ${PDAL_LIBRARIES})

I have only changed the line find_package(PDAL REQUIRED CONFIG) from find_package(PDAL 1.6.0 REQUIRED CONFIG) since I asked the question.

Upvotes: 1

Views: 3558

Answers (1)

mvolden
mvolden

Reputation: 74

Basically, CMake is telling you that it has found a 64 Bit version of the PDAL library, but that does not match with the number of bits CMake has deduced you compiler is using.

Therefore, Cmake is adding the '(64bit)' to the version string.

Try to double check that your environment is in fact set up to a 64 bit compiler. You should be able to verify that from the CMakeError.txt or CMakeOutput.txt files that are somewhere in your build directory.

Either the path to the compiler will give you a clue, or the first output line from the compiler itself. For example mine says:

Microsoft (R) C/C++ Optimizing compiler version 19.14.26433 for x64

Upvotes: 3

Related Questions