Page 1 of 1

Could not find a configuration file for package OpenSim that is compatible with requested version (64bit)

Posted: Sun May 09, 2021 11:21 pm
by anacsousa
Hi guys, I am having some trouble finding the OpenSim library when compiling in windows. It looks for the OpenSimConfig.cmake in the correct folder, but it complains about the software version. Everything was installed in 64 bit, so I don't quite understand what is happening.

Setup
  • Windows 10 Home
    OpenSim 4.1 (and OpenSim 4.2) 64 bit
    cmake version 3.20.0
    Visual Studio 2017 Developer Command Prompt v15.9.34 Environment initialized for: 'x64_x86' (I also tried for 'x64')
Cmake Code

Code: Select all

#This is a template CMake file to quick start OpenSim projects
#Add to your environment variables Opensim_DIR, pointing at the
#directory where OpenSim was installed.

cmake_minimum_required (VERSION 3.0.0)
project (cycling-controller)

add_definitions(/DBASE_DIR="${CMAKE_CURRENT_LIST_DIR}")

# find_package(Opensim REQUIRED)
set(OpenSim_DIR "C:/OpenSim 4.2")
set(OPENSIM_INSTALL_DIR "C:/OpenSim 4.2/cmake"
        CACHE PATH "Top-level directory of OpenSim install")
find_package(OpenSim REQUIRED PATHS "${OPENSIM_INSTALL_DIR}")

add_subdirectory(ceinms2)
add_subdirectory(src)


Command

Code: Select all

cmake ../
Error message

Code: Select all

-- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.19041.
CMake Error at CMakeLists.txt:14 (find_package):
  Could not find a configuration file for package "OpenSim" that is
  compatible with requested version "".

  The following configuration files were considered but not accepted:

    C:/OpenSim 4.1/cmake/OpenSimConfig.cmake, version: 4.1 (64bit)
    C:/OpenSim 4.2/cmake/OpenSimConfig.cmake, version: 4.2 (64bit)



-- Configuring incomplete, errors occurred!
See also "C:/Users/anacs/Desktop/sandbox/cycling-controller/CMakeFiles/CMakeOutput.log".

Re: Could not find a configuration file for package OpenSim that is compatible with requested version (64bit)

Posted: Fri Aug 05, 2022 8:04 am
by melaniehook
Hi Ana,
I'm having the same issue. Were you able to find a solution?

Thanks,
Melanie Hook