diff options
-rw-r--r-- | INSTALL.md | 2 | ||||
-rw-r--r-- | core/CMakeLists.txt | 23 |
2 files changed, 18 insertions, 7 deletions
@@ -63,9 +63,7 @@ mkdir build && cd build | |||
63 | cmake .. | 63 | cmake .. |
64 | ``` | 64 | ``` |
65 | Advance cmake options: | 65 | Advance cmake options: |
66 | - `-DSHARED_TOXCORE=ON` (default `OFF`) � Build Core as a shared library. | ||
67 | - `-DUSE_NACL=ON` (default `OFF`) � Use NaCl library instead of libsodium. | 66 | - `-DUSE_NACL=ON` (default `OFF`) � Use NaCl library instead of libsodium. |
68 | - `-DNO_WIDECHAR=ON` (default `OFF`) � Disable wide char in toxic. | ||
69 | 67 | ||
70 | Note that you should call cmake on the root [`CMakeLists.txt`](/CMakeLists.txt) file only. | 68 | Note that you should call cmake on the root [`CMakeLists.txt`](/CMakeLists.txt) file only. |
71 | 69 | ||
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 55a41912..02a42849 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt | |||
@@ -12,14 +12,27 @@ set(core_sources | |||
12 | util.c | 12 | util.c |
13 | ping.c) | 13 | ping.c) |
14 | 14 | ||
15 | if(SHARED_TOXCORE) | 15 | set(core_headers |
16 | add_library(toxcore SHARED ${core_sources}) | 16 | DHT.h |
17 | else() | 17 | network.h |
18 | add_library(toxcore ${core_sources}) | 18 | Lossless_UDP.h |
19 | endif() | 19 | net_crypto.h |
20 | friend_requests.h | ||
21 | LAN_discovery.h | ||
22 | Messenger.h | ||
23 | util.h | ||
24 | ping.h) | ||
25 | |||
26 | add_library(toxcore SHARED ${core_sources}) | ||
27 | add_library(toxcore_static ${core_sources}) | ||
28 | set_target_properties(toxcore_static PROPERTIES OUTPUT_NAME toxcore) | ||
20 | 29 | ||
21 | target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY}) | 30 | target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY}) |
22 | 31 | ||
32 | install(TARGETS toxcore toxcore_static DESTINATION lib) | ||
33 | install(FILES ${core_headers} DESTINATION include) | ||
34 | |||
23 | if(WIN32) | 35 | if(WIN32) |
24 | target_link_libraries(toxcore ws2_32) | 36 | target_link_libraries(toxcore ws2_32) |
25 | endif() | 37 | endif() |
38 | |||