mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 13:20:03 +00:00 
			
		
		
		
	externals: allow users to use system JSON headers (nlohmann-json3) (#7042)
This commit is contained in:
		
							parent
							
								
									72ff0c5337
								
							
						
					
					
						commit
						483e877001
					
				
					 2 changed files with 11 additions and 1 deletions
				
			
		
							
								
								
									
										11
									
								
								externals/CMakeLists.txt
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								externals/CMakeLists.txt
									
										
									
									
										vendored
									
									
								
							|  | @ -175,7 +175,16 @@ endif() | |||
| 
 | ||||
| # JSON | ||||
| add_library(json-headers INTERFACE) | ||||
| target_include_directories(json-headers INTERFACE ./json) | ||||
| if (USE_SYSTEM_JSON) | ||||
|     find_package(nlohmann_json REQUIRED) | ||||
|     target_link_libraries(json-headers INTERFACE nlohmann_json::nlohmann_json) | ||||
|     get_target_property(NLOHMANN_PREFIX nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES) | ||||
|     # The nlohmann-json3 package expects "#include <nlohmann/json.hpp>" | ||||
|     # Citra uses "#include <json.hpp>" so we have to add this manually | ||||
|     target_include_directories(json-headers SYSTEM INTERFACE "${NLOHMANN_PREFIX}/nlohmann") | ||||
| else() | ||||
|     target_include_directories(json-headers SYSTEM INTERFACE ./json) | ||||
| endif() | ||||
| 
 | ||||
| # OpenSSL | ||||
| if (USE_SYSTEM_OPENSSL) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue