admin管理员组文章数量:1402976
I have the following install command:
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "$<TARGET_FILE_DIR:${PROJECT_NAME}>")
Why does this command install an include
directory with C++ .h
header files from my dependency library libjxl
?
-- Installing: C:/code/texture-streaming/decoder/bin/x64/release/include/jxl/decode_cxx.h
I was under the impression that I would have to use PUBLIC_HEADER
to install header files. But I'm only asking for RUNTIME.
cmake version 3.31.6
CMakeLists.txt
cmake_minimum_required(VERSION 3.21)
project(jpegxl-decoder VERSION 0.0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(MSVC)
add_compile_options(
/permissive-
/Zc:preprocessor
)
endif()
add_subdirectory(extern)
add_subdirectory(app)
app/CMakeLists.txt
project(app)
add_executable(${PROJECT_NAME} app.cpp)
target_link_libraries(${PROJECT_NAME} PUBLIC jxl)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "$<TARGET_FILE_DIR:${PROJECT_NAME}>")
extern/CMakeLists.txt
include(FetchContent)
set(BUILD_TESTING OFF CACHE BOOL "")
set(JPEGXL_ENABLE_TOOLS OFF CACHE BOOL "")
FetchContent_Declare(
Libjxl
GIT_REPOSITORY .git
GIT_TAG v0.11.1
)
FetchContent_MakeAvailable(Libjxl)
版权声明:本文标题:Why does CMake install(TARGETS) install header files even if I don't specify PUBLIC_HEADER? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744091329a2589477.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论