• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Boilerplate: Copyright (C) 2014-2017 Ruslan Baratov
2# Modification: Copyright (C) 2017 David Hirvonen
3
4cmake_minimum_required(VERSION 3.0)
5project(NEON_2_SSE VERSION 1.0.0)
6
7add_library(${PROJECT_NAME} INTERFACE)
8
9target_include_directories(${PROJECT_NAME}
10  INTERFACE
11  "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
12  )
13
14### Install ###
15set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
16
17set(config_install_dir "lib/cmake/${PROJECT_NAME}")
18set(include_install_dir "include")
19
20set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
21set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
22set(targets_export_name "${PROJECT_NAME}Targets")
23set(namespace "${PROJECT_NAME}::")
24
25include(CMakePackageConfigHelpers)
26write_basic_package_version_file(
27    "${version_config}" COMPATIBILITY SameMajorVersion
28)
29
30# Note: use 'targets_export_name'
31configure_file("cmake/Config.cmake.in" "${project_config}" @ONLY)
32
33install(
34    TARGETS ${PROJECT_NAME}
35    EXPORT "${targets_export_name}"
36    INCLUDES DESTINATION "${include_install_dir}"
37)
38
39install(
40    FILES NEON_2_SSE.h
41    DESTINATION "${include_install_dir}"
42)
43
44install(
45    FILES "${project_config}" "${version_config}"
46    DESTINATION "${config_install_dir}"
47)
48
49install(
50    EXPORT "${targets_export_name}"
51    NAMESPACE "${namespace}"
52    DESTINATION "${config_install_dir}"
53)
54