forked from xbmc/kodi-deps
-
Notifications
You must be signed in to change notification settings - Fork 1
/
crossguid.diff
71 lines (71 loc) · 1.76 KB
/
crossguid.diff
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,64 @@
+cmake_minimum_required(VERSION 3.2)
+
+project(crossguid VERSION 0.1 LANGUAGES CXX)
+set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_BUILD_TYPE})
+include(CPack)
+
+if(MSVC)
+ set(CMAKE_DEBUG_POSTFIX "d")
+endif()
+
+
+add_library(crossguid STATIC
+ guid.h
+ guid.cpp
+)
+target_include_directories(
+ crossguid PRIVATE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ INTERFACE
+ $<INSTALL_INTERFACE:include>
+)
+
+target_compile_definitions(
+ crossguid PUBLIC
+ GUID_WINDOWS
+)
+
+include(CMakePackageConfigHelpers)
+write_basic_package_version_file(
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY AnyNewerVersion
+)
+
+install(TARGETS crossguid EXPORT crossguid
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+if(MSVC)
+ set_target_properties(crossguid PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} COMPILE_PDB_NAME crossguid COMPILE_PDB_NAME_DEBUG crossguidd)
+ install(FILES ${PROJECT_BINARY_DIR}/RelWithDebInfo/crossguid.pdb DESTINATION lib CONFIGURATIONS RelWithDebInfo)
+ install(FILES ${PROJECT_BINARY_DIR}/Debug/crossguidd.pdb DESTINATION lib CONFIGURATIONS Debug)
+endif()
+
+install(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/guid.h
+ DESTINATION include)
+
+install(EXPORT crossguid
+ FILE
+ crossguid.cmake
+ NAMESPACE
+ crossguid::
+ DESTINATION
+ lib/cmake/crossguid
+)
+install(
+ FILES
+ cmake/crossguid-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/crossguid-config-version.cmake
+ DESTINATION
+ lib/cmake/crossguid
+)
--- /dev/null
+++ b/cmake/crossguid-config.cmake
@@ -0,0 +1 @@
+include(${CMAKE_CURRENT_LIST_DIR}/crossguid.cmake)