I have written a library in c++. I am using CMAKE to build the library. The library gets built but the header files are not getting installed. Below is how my CMakeLists.txt file looks like.
cmake_minimum_required(VERSION 3.14)
project(Strand)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE Release)
set(Headers [all the header files])
set(Sources [all the source files])
add_library(LibraryName STATIC ${Sources} ${Headers})
install(TARGETS LibraryName DESTINATION /usr/lib)
In addition, the header files are quite a number. So I want all the header files to be installed into a directory, e.g. usr/local/include/LibraryName/[all header files]
.
How can I achieve of fix this?