-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
50 lines (41 loc) · 1.39 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
cmake_minimum_required(VERSION 3.12)
include(CMakePackageConfigHelpers)
project(embedresource VERSION 0.0.1)
option(EMBEDRESOURCE_INSTALL "Install EmbedResource Binaries and Files" ON)
set(CMAKE_CXX_STANDARD 20)
add_executable(embedresource embedresource.cpp)
set_target_properties(embedresource PROPERTIES PUBLIC_HEADER "EmbeddedResource.h")
configure_package_config_file(cmake/EmbedResourceConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/generated/EmbedResourceConfig.cmake
INSTALL_DESTINATION share/embedresource
)
include(cmake/EmbedResourceTargets.cmake) # For add_subdirectory mode
if (EMBEDRESOURCE_INSTALL)
install(
TARGETS embedresource
EXPORT EmbedResourceTargets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include/embedresource
)
install(FILES
cmake/EmbedResourceTargets.cmake
cmake/FindOrBuildTool.cmake
${CMAKE_CURRENT_BINARY_DIR}/generated/EmbedResourceConfig.cmake
DESTINATION share/embedresource
)
# install(EXPORT EmbedResourceTargets
# NAMESPACE embedresource
# DESTINATION share/embedresource
# )
endif()
#
# CPACK
#
set (CPACK_GENERATOR ZIP)
set (CPACK_PACKAGE_NAME ${PROJECT_NAME})
set (CPACK_PACKAGE_VENDOR "Ankur Verma")
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "EmbedResource")
set (CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
include(CPack)