leapmotion / VRIntro

Leap Motion's intro to VR
56 stars 19 forks source link

Unknown CMake command "select_configurations" #13

Closed kgbook closed 6 years ago

kgbook commented 6 years ago

detailed info

CMake Error at FindCURL.cmake:35 (include):
  include could not find load file:

    SelectConfigurations
Call Stack (most recent call first):
  CMakeLists.txt:25 (find_package)

CMake Error at FindCURL.cmake:36 (select_configurations):
  Unknown CMake command "select_configurations".
Call Stack (most recent call first):
  CMakeLists.txt:25 (find_package)

-- Configuring incomplete, errors occurred!

I did this

CMakeLists.txt

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR};${CMAKE_MODULE_PATH}")
set(CURL_ROOT_PATH "/usr/local/Cellar/curl/7.61.0")
find_package(CURL REQUIRED)

include_directories(${CURL_INCLUDE_DIR})

I expected the following

find_package(CURL REQUIRED) with no error.

cmake version

kang:build kang$ cmake --version
cmake version 3.12.0

system info

Mac OS X 10.13.5 (17F77)

kang:build kang$ uname -a
Darwin kang 17.6.0 Darwin Kernel Version 17.6.0: Tue May  8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
kgbook commented 6 years ago

I download SelectConfigurations.cmake and copy it to the project path, the issue has solved!

But a new problem:

Unknown CMake command "generate_import_target".
kgbook commented 6 years ago

I found it in CreateImportTargetHelpers.cmake.

I just want cmake module to find_package(CURL).

Perhaps it's better to git clone the repo, and grep the symbol.