| 
									
										
										
										
											2021-04-26 13:12:52 +00:00
										 |  |  | cmake_minimum_required(VERSION 3.10)
 | 
					
						
							| 
									
										
										
										
											2021-04-21 23:52:16 +00:00
										 |  |  | project(discord_integration)
 | 
					
						
							| 
									
										
										
										
											2021-04-20 00:58:47 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if (MSVC)
 | 
					
						
							|  |  |  |     set(CMAKE_CXX_FLAGS "-O2 /std:c++17 /EHsc")
 | 
					
						
							|  |  |  | elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 | 
					
						
							| 
									
										
										
										
											2021-04-20 01:47:11 +00:00
										 |  |  |     set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup -fPIC")
 | 
					
						
							| 
									
										
										
										
											2021-04-20 00:58:47 +00:00
										 |  |  | else ()
 | 
					
						
							| 
									
										
										
										
											2021-04-20 01:47:11 +00:00
										 |  |  |     set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -fPIC")
 | 
					
						
							| 
									
										
										
										
											2021-04-20 00:58:47 +00:00
										 |  |  | endif ()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-20 21:33:11 +00:00
										 |  |  | add_subdirectory("discord-rpc")
 | 
					
						
							| 
									
										
										
										
											2021-04-20 00:58:47 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-20 21:33:11 +00:00
										 |  |  | file(GLOB SRC "src/*.cpp")
 | 
					
						
							| 
									
										
										
										
											2021-04-22 02:15:23 +00:00
										 |  |  | include_directories("src/" "discord-rpc/include" "../radio/src/")
 | 
					
						
							| 
									
										
										
										
											2021-04-20 01:19:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-21 23:52:16 +00:00
										 |  |  | add_library(discord_integration SHARED ${SRC})
 | 
					
						
							|  |  |  | target_link_libraries(discord_integration PUBLIC sdrpp_core discord-rpc)
 | 
					
						
							|  |  |  | set_target_properties(discord_integration PROPERTIES PREFIX "")
 | 
					
						
							| 
									
										
										
										
											2021-04-20 00:58:47 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Install directives
 | 
					
						
							| 
									
										
										
										
											2021-04-21 23:52:16 +00:00
										 |  |  | install(TARGETS discord_integration DESTINATION lib/sdrpp/plugins)
 |