Closed JonLiu1993 closed 3 years ago
Relate to #13761
I think this should be reported upstream at https://github.com/microsoft/vcpkg
We are happy to help, but we don't control vcpkg packaging.
@myd7349 can you help?
The source file simdjson.cpp isn't installed to the install directory, that caused the user can't use that source file.
Why would we install the source file simdjson.cpp
? We install the compiled sources and the header (simdjson.h), but not the source files.
You configure your project with...
find_package(simdjson CONFIG REQUIRED)
target_link_libraries(test PRIVATE simdjson::simdjson simdjson::simdjson-flags simdjson::simdjson-source simdjson::simdjson-headers)
I am not a vcpkg expert but this looks wrong. I think it should be something like
target_link_libraries(test PRIVATE simdjson)
or maybe
target_link_libraries(test PRIVATE simdjson::simdjson)
The following works for me...
cmake_minimum_required(VERSION 3.0)
project(test)
add_executable(test test.cpp)
find_package(simdjson CONFIG REQUIRED)
find_package(Threads REQUIRED)
target_link_libraries(test PRIVATE simdjson::simdjson)
I am going to close this issue and open an issue with downstream.
So I commented at https://github.com/microsoft/vcpkg/issues/13761 instead of opening a new issue.
I think that the instructions that users receive need to be updated.
Reopening because I think our CMake build is bad.
cc @Neumann-A
Sorry for the long delay. I will look into it this weekend.
@myd7349 I think we solve it via https://github.com/simdjson/simdjson/pull/1385
Please have a look at the PR if you can. I will take all the advice I can get.
Hi guys, I'm vcpkg maintainer. Recently I tried to update simdjson in vcpkg but some issues happend when I tried to use it after build.
Host Environment
To Reproduce Steps to reproduce the behavior:
git clone https://github.com/microsoft/vcpkg.git
./vcpkg install simdjson:x86-windows
CMakeLists.txt
:add_executable(test test.cpp)
find_package(simdjson CONFIG REQUIRED) target_link_libraries(test PRIVATE simdjson::simdjson simdjson::simdjson-flags simdjson::simdjson-source simdjson::simdjson-headers)
1> CMake generation started for configuration: 'x86-Debug'. 1> Command line: "cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\usr\source\repos\CMakeProject20\out\install\x86-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/test6/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\usr\source\repos\CMakeProject20" 2>&1" 1> Working directory: C:\Users\usr\source\repos\CMakeProject20\out\build\x86-Debug 1> [CMake] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17134. 1> [CMake] -- Configuring done 1> [CMake] CMake Error at F:/test6/vcpkg/scripts/buildsystems/vcpkg.cmake:454 (_add_executable): 1> [CMake] Cannot find source file: 1> [CMake] 1> [CMake] //simdjson.cpp 1> [CMake] 1> [CMake] Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm 1> [CMake] .hpp .hxx .in .txx 1> [CMake] Call Stack (most recent call first): 1> [CMake] CMakeProject20/CMakeLists.txt:4 (add_executable) 1> [CMake] -- Generating done 1> [CMake] CMake Generate step failed. Build files cannot be regenerated correctly. 1> 'cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\usr\source\repos\CMakeProject20\out\install\x86-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/test6/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\usr\source\repos\CMakeProject20" 2>&1"' execution failed with error: ''cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\usr\source\repos\CMakeProject20\out\install\x86-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/test6/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\usr\source\repos\CMakeProject20" 2>&1"' returned with exit code: 1'.
simdjson.cpp
isn't installed to the install directory, that caused the user can't use that source file.Can anyone take a look?
Thanks.