mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Detection of Win10 3D printing API from the default Visual Studio env
variables.
This commit is contained in:
		
							parent
							
								
									589d2be442
								
							
						
					
					
						commit
						ed7be17bf1
					
				
					 1 changed files with 23 additions and 11 deletions
				
			
		|  | @ -146,21 +146,33 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) | |||
| # WIN10SDK_PATH is used to point CMake to the WIN10 SDK installation directory. | ||||
| # We pick it from environment if it is not defined in another way | ||||
| if(WIN32) | ||||
|         if(NOT DEFINED WIN10SDK_PATH) | ||||
|                 if(DEFINED ENV{WIN10SDK_PATH}) | ||||
|                         set(WIN10SDK_PATH "$ENV{WIN10SDK_PATH}") | ||||
|                 endif() | ||||
|     if(NOT DEFINED WIN10SDK_PATH) | ||||
|         if(DEFINED ENV{WIN10SDK_PATH}) | ||||
|                 set(WIN10SDK_PATH "$ENV{WIN10SDK_PATH}") | ||||
|         endif() | ||||
|         if(DEFINED WIN10SDK_PATH AND NOT EXISTS "${WIN10SDK_PATH}/include/winrt/windows.graphics.printing3d.h") | ||||
|                 message("WIN10SDK_PATH is invalid: ${WIN10SDK_PATH}") | ||||
|                 message("${WIN10SDK_PATH}/include/winrt/windows.graphics.printing3d.h was not found") | ||||
|                 message("STL fixing by the Netfabb service will not be compiled") | ||||
|                 unset(WIN10SDK_PATH) | ||||
|     endif() | ||||
|     if(DEFINED WIN10SDK_PATH) | ||||
|         if (EXISTS "${WIN10SDK_PATH}/include/winrt/windows.graphics.printing3d.h") | ||||
|             set(WIN10SDK_INCLUDE_PATH "${WIN10SDK_PATH}/Include") | ||||
|         else() | ||||
|             message("WIN10SDK_PATH is invalid: ${WIN10SDK_PATH}") | ||||
|             message("${WIN10SDK_PATH}/include/winrt/windows.graphics.printing3d.h was not found") | ||||
|             message("STL fixing by the Netfabb service will not be compiled") | ||||
|             unset(WIN10SDK_PATH) | ||||
|         endif() | ||||
|     if(WIN10SDK_PATH) | ||||
|     else() | ||||
|         # Try to use the default Windows 10 SDK path. | ||||
|         set(WIN10SDK_INCLUDE_PATH "$ENV{WindowsSdkDir}/Include/$ENV{WindowsSDKVersion}") | ||||
|         if (NOT EXISTS "${WIN10SDK_INCLUDE_PATH}/winrt/windows.graphics.printing3d.h") | ||||
|             message("${WIN10SDK_INCLUDE_PATH}/winrt/windows.graphics.printing3d.h was not found") | ||||
|             message("STL fixing by the Netfabb service will not be compiled") | ||||
|             unset(WIN10SDK_INCLUDE_PATH) | ||||
|         endif() | ||||
|     endif() | ||||
|     if(WIN10SDK_INCLUDE_PATH) | ||||
|         message("Building with Win10 Netfabb STL fixing service support") | ||||
|         add_definitions(-DHAS_WIN10SDK) | ||||
|         include_directories("${WIN10SDK_PATH}/Include") | ||||
|         include_directories("${WIN10SDK_INCLUDE_PATH}") | ||||
|     else() | ||||
|         message("Building without Win10 Netfabb STL fixing service support") | ||||
|     endif() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vojtech Bubnik
						Vojtech Bubnik