我正在尝试使用cmake和Visual Studio 2017编译libjpeg-turbo。它可以编译,但是安装存在问题
1>------ Build started: Project: simd, Configuration: Debug Win32 ------
2>------ Build started: Project: INSTALL, Configuration: Debug Win32 ------
2>-- Install configuration: "Debug"
2>-- Installing: C:/install/lib/turbojpeg-staticd.lib
2>CMake Error at cmake_install.cmake:48 (file):
2> file INSTALL cannot find
2> "C:/build/lib-img/libjpeg-turbo-1.5.3/tjbench-static.exe".
他看错了地方,tjbench-static.exe
在Debug
子目录中。
CMakeLists.txt
代码在这里:
if(WITH_TURBOJPEG)
if(ENABLE_SHARED)
install(TARGETS turbojpeg tjbench
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
endif()
if(ENABLE_STATIC)
install(TARGETS turbojpeg-static ARCHIVE DESTINATION lib)
if(NOT ENABLE_SHARED)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/tjbench-static.exe
DESTINATION bin RENAME tjbench.exe)
endif()
endif()
install(FILES ${CMAKE_SOURCE_DIR}/turbojpeg.h DESTINATION include)
endif()
if(ENABLE_STATIC)
install(TARGETS jpeg-static ARCHIVE DESTINATION lib)
if(NOT ENABLE_SHARED)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe
DESTINATION bin RENAME cjpeg.exe)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe
DESTINATION bin RENAME djpeg.exe)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jpegtran-static.exe
DESTINATION bin RENAME jpegtran.exe)
endif()
endif()
完整版本:https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/CMakeLists.txt
嗯,已经有2.0.0版本了,我有1.5.3。让我们下载更新的版本...