fix windows build (#29)
* fix windows build * fix for Unix * Fix build if TLS is OFF * add OpenSSL req to ws * Fix build on Mac * fix tests for windows
This commit is contained in:
		
				
					committed by
					
						
						Benjamin Sergeant
					
				
			
			
				
	
			
			
			
						parent
						
							dac18fcabf
						
					
				
				
					commit
					fbb7c012a3
				
			@@ -7,7 +7,9 @@ cmake_minimum_required (VERSION 3.4.1)
 | 
			
		||||
project (ws)
 | 
			
		||||
 | 
			
		||||
# There's -Weverything too for clang
 | 
			
		||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
 | 
			
		||||
if (NOT WIN32)
 | 
			
		||||
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
 | 
			
		||||
#set(CMAKE_LD_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
 | 
			
		||||
@@ -51,4 +53,13 @@ add_executable(ws
 | 
			
		||||
  ws.cpp)
 | 
			
		||||
 | 
			
		||||
target_link_libraries(ws ixwebsocket)
 | 
			
		||||
 | 
			
		||||
if(NOT APPLE)
 | 
			
		||||
  find_package(OpenSSL REQUIRED)
 | 
			
		||||
  add_definitions(${OPENSSL_DEFINITIONS})
 | 
			
		||||
  message(STATUS "OpenSSL: " ${OPENSSL_VERSION})
 | 
			
		||||
  include_directories(${OPENSSL_INCLUDE_DIR})
 | 
			
		||||
  target_link_libraries(ws ${OPENSSL_LIBRARIES})
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
install(TARGETS ws RUNTIME DESTINATION bin)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user