summarylogtreecommitdiffstats
path: root/fix-shared-tinyxml2.patch
blob: 240770e31ffc334e0157ef3245a89e8e2a3d2451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 674dbd6..1ba8329 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.1)
 project(TinyEXIF)
 include(GNUInstallDirs)
 
+find_package(tinyxml2 REQUIRED)
+
 #CMAKE_BUILD_TOOL
 
 ################################
@@ -141,6 +143,10 @@ if(BUILD_STATIC_LIBS)
 		endif()
 	endif()
 
+	# export targets for find_package config mode
+	export(TARGETS TinyEXIFstatic
+			FILE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake)
+
 	install(TARGETS TinyEXIFstatic
 			EXPORT ${CMAKE_PROJECT_NAME}Targets
 			RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}