Ran, I did something like that with the following:

cmake_minimum_required(VERSION 3.11) project(X) include(GNUInstallDirs) set(X_inc "${CMAKE_CURRENT_SOURCE_DIR}/include/") set(X_lib "${CMAKE_CURRENT_SOURCE_DIR}/lib/") install(DIRECTORY ${X_lib} DESTINATION ${CMAKE_INSTALL_LIBDIR} FILES_MATCHING PATTERN "libX*.*")

install(DIRECTORY ${X_inc} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h")

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to