Closed
Description
I am building docopt on Windows 10 with VS2015 and CMake 3.6.1 and trying to use it in our project OpenSim. I am using the following steps in PowerShell:
git clone git@github.com:docopt/docopt.cpp.git
cd docopt.cpp
mkdir build
cd build
cmake .. -G"Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX="..\install"
cmake --build . --target INSTALL --config RelWithDebInfo
At this point, the directory install
contains:
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 8/15/2016 12:13 PM include
d----- 8/15/2016 12:13 PM lib
And the directory lib
above contains:
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 8/15/2016 12:13 PM cmake
-a---- 8/15/2016 12:13 PM 348672 docopt.dll
-a---- 8/15/2016 12:13 PM 3234828 docopt_s.lib
I now create a downstream project:
cd ~
mkdir docopt.cpp_downstream
cd docopt.cpp_downstream
Create a file CMakeLists.txt
with following contents:
project(docopt_downstream)
cmake_minimum_required(VERSION 3.2)
find_package(docopt
REQUIRED)
I then try building the downstream project as follows:
mkdir build
cd build
cmake .. -G"Visual Studio 14 2015 Win64" `
-DCMAKE_INSTALL_PREFIX="..\install" `
-Ddocopt_DIR="<full-path>\docopt.cpp\install\lib\cmake\docopt"
I get the following error from CMake:
CMake Error at <full-path>/docopt.cpp/install/lib/cmake/docopt/docopt-targets.cmake:78 (message):
The imported target "docopt" references the file
"<full-path>/docopt.cpp/install/lib/docopt.lib"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"<full-path>/docopt.cpp/install/lib/cmake/docopt/docopt-targets.cmake"
but not all the files it references.
Call Stack (most recent call first):
<full-path>/docopt.cpp/install/lib/cmake/docopt/docopt-config.cmake:1 (include)
CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
So it looks like this is looking for file docopt.lib
which is (probably incorrectly) named docopt_s.lib
.
Am I doing something wrong or this is a bug ? If it is a bug, I can help fix it if I get some pointers on where to look. Please let me know.
Metadata
Metadata
Assignees
Labels
No labels