Add option to compile qwt as static library (ON by default)
This commit is contained in:
		
					parent
					
						
							
								c53c8e821f
							
						
					
				
			
			
				commit
				
					
						9570718df1
					
				
			
		
					 1 changed files with 13 additions and 7 deletions
				
			
		| 
						 | 
					@ -1,3 +1,5 @@
 | 
				
			||||||
 | 
					option(QWT_USE_STATIC_LIBS "Whether to compile qwt as a static library" ON)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#----------------------------------------------------------------
 | 
					#----------------------------------------------------------------
 | 
				
			||||||
# Packages
 | 
					# Packages
 | 
				
			||||||
#----------------------------------------------------------------
 | 
					#----------------------------------------------------------------
 | 
				
			||||||
| 
						 | 
					@ -219,14 +221,18 @@ set(qwt_sources
 | 
				
			||||||
#----------------------------------------------------------------
 | 
					#----------------------------------------------------------------
 | 
				
			||||||
# Target
 | 
					# Target
 | 
				
			||||||
#----------------------------------------------------------------
 | 
					#----------------------------------------------------------------
 | 
				
			||||||
add_library(qwt SHARED ${qwt_headers} ${qwt_sources})
 | 
					if(QWT_USE_STATIC_LIBS)
 | 
				
			||||||
 | 
					    add_library(qwt STATIC ${qwt_headers} ${qwt_sources})
 | 
				
			||||||
 | 
					else()
 | 
				
			||||||
 | 
					    add_library(qwt SHARED ${qwt_headers} ${qwt_sources})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_compile_definitions(qwt
 | 
					    target_compile_definitions(qwt
 | 
				
			||||||
	PUBLIC
 | 
					        PUBLIC
 | 
				
			||||||
		$<$<BOOL:MSVC>:QWT_DLL>
 | 
					            $<$<BOOL:MSVC>:QWT_DLL>
 | 
				
			||||||
	PRIVATE
 | 
					        PRIVATE
 | 
				
			||||||
		$<$<BOOL:MSVC>:QWT_MAKEDLL>
 | 
					            $<$<BOOL:MSVC>:QWT_MAKEDLL>
 | 
				
			||||||
)
 | 
					    )
 | 
				
			||||||
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_include_directories(qwt
 | 
					target_include_directories(qwt
 | 
				
			||||||
	PUBLIC
 | 
						PUBLIC
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue