Description
It happens that I build OpenSim both for Debug and Release. This is because many libraries do not come up with a RelWithDebInfo (e.g. Qt). While docopts seems cool, it installs a Debug and Release version with the same name (e.g. it does not configure its docopt-targets-debug/release.cmake file correctly), thus this can cause problems. I suggest to make a PR (I will see if I have time) or maybe consider a header only library that can be integrated directly into OpenSim cxxopts.
The OpenSimConfig.cmake
produced by the installer includes a line at the end which finds Simbody by default. This is cool since it renders the user from manually finding Simbody. Unfortunately, someone may be interested to link against its own Simbody build. In this case there is an error in the CMake configure:
CMake Error at C:/Users/mitkof6/Google Drive/libs/opensim-core/install/v4.0.0_beta/win10-vs15-x86/dependencies/simbody/cmake/SimbodyConfig.cmake:104 (add_library):
add_library cannot create imported target "blas" because another target
with the same name already exists.
Call Stack (most recent call first):
C:/Users/mitkof6/Google Drive/libs/opensim-core/install/v4.0.0_beta/win10-vs15-x86/cmake/OpenSimConfig.cmake:109 (find_package)
CMakeLists.txt:123 (find_package)
CMake Error at C:/Users/mitkof6/Google Drive/libs/opensim-core/install/v4.0.0_beta/win10-vs15-x86/dependencies/simbody/cmake/SimbodyConfig.cmake:110 (add_library):
add_library cannot create imported target "lapack" because another target
with the same name already exists.
Call Stack (most recent call first):
C:/Users/mitkof6/Google Drive/libs/opensim-core/install/v4.0.0_beta/win10-vs15-x86/cmake/OpenSimConfig.cmake:109 (find_package)
CMakeLists.txt:123 (find_package)
CMake Error at C:/Users/mitkof6/Google Drive/libs/opensim-core/install/v4.0.0_beta/win10-vs15-x86/dependencies/simbody/cmake/SimbodyConfig.cmake:125 (add_library):
add_library cannot create imported target "pthread" because another target
with the same name already exists.
Call Stack (most recent call first):
C:/Users/mitkof6/Google Drive/libs/opensim-core/install/v4.0.0_beta/win10-vs15-x86/cmake/OpenSimConfig.cmake:109 (find_package)
CMakeLists.txt:123 (find_package)
Personally I commented these two lines. I think it would be nice to have a variable (on by default) which will choose whether to link by default or require the user to provide its own find.
If python bindings are on and you are building in debug mode, while python's debug libraries are missing there is an error which prevents the construction of the cmake folder and its content in the install dir. The rest of the files (.h, dlls, lib) are copied into the install folder. Someone may mistakenly think that the library has been built correctly, since the building process builds most of its targets but the cmake folder is missing.