Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

config Klampt for windows #17

#1

Hi,
I've tried to use klampt on Windows building the following Cmake file:

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(ISS)
SET(KLAMPT_ROOT "C:/Klampt_files/include_lib/Klampt")
SET(KRIS_ROOT "C:/Klampt_files/include_lib/KrisLibrary")
SET (CMAKE_MODULE_PATH "${KLAMPT_ROOT}/CMakeModules")
SET (CMAKE_MODULE_PATH "${KRIS_ROOT}/CMakeModules")
FIND_PACKAGE(Klampt REQUIRED)
ADD_DEFINITIONS(${KLAMPT_DEFINITIONS})
INCLUDE_DIRECTORIES(${KLAMPT_INCLUDE_DIRS})
ADD_EXECUTABLE(ISS iss.cpp)
TARGET_LINK_LIBRARIES(MyApp ${KLAMPT_LIBRARIES})

But I end up with the following errors (I'm using VS2019) :

1> [CMake] CMake Warning (dev) at C:\Users\utente\Desktop\ISS\ISS\CMakeLists.txt:7 (FIND_PACKAGE):
1> [CMake] Policy CMP0074 is not set: find_package uses _ROOT variables.
1> [CMake] Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
1> [CMake] command to set the policy and suppress this warning.
1> [CMake]
1> [CMake] Environment variable Klampt_ROOT is set to:
1> [CMake]
1> [CMake] C:\Klampt
1> [CMake]
1> [CMake] For compatibility, CMake is ignoring the variable.
1> [CMake] This warning is for project developers. Use -Wno-dev to suppress it.
1> [CMake]
1> [CMake] CMake Error at C:\Users\utente\Desktop\ISS\ISS\CMakeLists.txt:7 (FIND_PACKAGE):
1> [CMake] By not providing "FindKlampt.cmake" in CMAKE_MODULE_PATH this project has
1> [CMake] asked CMake to find a package configuration file provided by "Klampt", but
1> [CMake] CMake did not find one.
1> [CMake]
1> [CMake] Could not find a package configuration file provided by "Klampt" with any
1> [CMake] of the following names:
1> [CMake]
1> [CMake] KlamptConfig.cmake
1> [CMake] klampt-config.cmake
1> [CMake]
1> [CMake] Add the installation prefix of "Klampt" to CMAKE_PREFIX_PATH or set
1> [CMake] "Klampt_DIR" to a directory containing one of the above files. If "Klampt"
1> [CMake] provides a separate development package or SDK, be sure it has been
1> [CMake] installed.
1> [CMake]
1> [CMake]
1> [CMake] -- Configuring incomplete, errors occurred!

How can I fix for this error ?
Thanks in advance!

  • replies 1
  • views 2.9K
  • likes 0
#2

It looks like you’re overriding your CMAKE_MODULE_PATH in the second SET call. Do SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ...) in your second call.