CMAKE - How to properly copy static library's header file into /usr/include?

前端 未结 4 1479
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 20:26

I\'m getting into CMAKE usage with C and actually I\'m creating two very small static libraries.

My goal is:

  1. The libraries are compiled and linked into
4条回答
  •  死守一世寂寞
    2020-12-12 21:04

    In a much better way, will copy all files that match the pattern and will preserve the directory structure.

    INSTALL (
        DIRECTORY ${CMAKE_SOURCE_DIR}/include/
        DESTINATION include
        FILES_MATCHING PATTERN "*.h*")
    

提交回复
热议问题