Warning, /frameworks/extra-cmake-modules/tests/ECMGenerateExportHeaderTest/library/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.0.0) 0002 0003 # keep version in sync with the one used in consumer/CMakeLists.txt for the library 0004 # ideally would be send over by an exported target property, 0005 # but exporting custom properties via EXPORT_PROPERTIES only was added in CMake 3.12 0006 project(library VERSION 2.40.0) 0007 0008 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules) 0009 include(ECMGenerateExportHeader) 0010 0011 set(_public_includedir "include/library") 0012 0013 add_library(library library.cpp) 0014 target_include_directories(library 0015 PUBLIC 0016 "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>" 0017 "$<INSTALL_INTERFACE:${_public_includedir}>" 0018 ) 0019 0020 if(SET_GROUP) 0021 set(_group_args GROUP_BASE_NAME LIBGROUP) 0022 endif() 0023 0024 ecm_generate_export_header(library 0025 ${_group_args} 0026 VERSION ${library_VERSION} 0027 DEPRECATION_VERSIONS 2.0 2.12 0028 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} 0029 ) 0030 0031 install(TARGETS library DESTINATION lib EXPORT library_targets) 0032 0033 install(EXPORT library_targets FILE LibraryTargets.cmake DESTINATION lib/library) 0034 install(FILES 0035 library.hpp 0036 "${CMAKE_CURRENT_BINARY_DIR}/library_export.h" 0037 DESTINATION ${_public_includedir} 0038 ) 0039 0040 add_executable(dummy main.cpp)