File: CMakeLists.txt

package info (click to toggle)
csound 1%3A6.12.2~dfsg-3.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 36,020 kB
  • sloc: ansic: 188,464; cpp: 27,296; python: 3,101; yacc: 1,210; perl: 635; lisp: 411; sh: 403; tcl: 341; lex: 217; makefile: 135
file content (46 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
option(BUILD_WEBSOCKET_OPCODE "Build the websocket opcode" ON)
FIND_PATH ( WEBSOCKETS_H libwebsockets.h
    /usr/local/include
    /usr/include
)

if(WIN32 AND NOT MSVC)
  find_library (websockets_library NAMES websockets_static)
else()
  FIND_LIBRARY ( websockets_library websockets
      /usr/local/lib
      /usr/lib
  )
  find_library (websockets_library NAMES websockets)

if(APPLE)
FIND_LIBRARY (ssl_library NAMES ssl.a
      /usr/local/lib
      /usr/lib
  )
   #find_library (crypto_library NAMES crypto.a
   FIND_LIBRARY ( crypto_library NAMES crypto.a
      /usr/local/lib
      /usr/lib
  )
   #find_library (crypto_library NAMES crypto)
endif()

endif()

check_include_file(libwebsockets.h WEBSOCKETS_H)

check_deps(BUILD_WEBSOCKET_OPCODE websockets_library)
if(BUILD_WEBSOCKET_OPCODE)

 	make_plugin(websocketIO WebSocketOpcode.c)
 	target_link_libraries(websocketIO ${websockets_library} ${CSOUNDLIB})

  if(APPLE)
   target_link_libraries(websocketIO /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a  z)
  endif()

  if(WIN32 AND NOT MSVC)
    target_link_libraries(websocketIO ssl crypto z ws2_32 wsock32)
  endif()
endif()