mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Add entry to allow make install
Always compile static and shared library, SHARED_TOXCORE is depreciated, "make install" places files on default prefix.
This commit is contained in:
parent
4d89d63c3f
commit
d746a01fbc
|
@ -63,9 +63,7 @@ mkdir build && cd build
|
||||||
cmake ..
|
cmake ..
|
||||||
```
|
```
|
||||||
Advance cmake options:
|
Advance cmake options:
|
||||||
- `-DSHARED_TOXCORE=ON` (default `OFF`) <20> Build Core as a shared library.
|
|
||||||
- `-DUSE_NACL=ON` (default `OFF`) <20> Use NaCl library instead of libsodium.
|
- `-DUSE_NACL=ON` (default `OFF`) <20> Use NaCl library instead of libsodium.
|
||||||
- `-DNO_WIDECHAR=ON` (default `OFF`) <20> Disable wide char in toxic.
|
|
||||||
|
|
||||||
Note that you should call cmake on the root [`CMakeLists.txt`](/CMakeLists.txt) file only.
|
Note that you should call cmake on the root [`CMakeLists.txt`](/CMakeLists.txt) file only.
|
||||||
|
|
||||||
|
|
|
@ -12,14 +12,27 @@ set(core_sources
|
||||||
util.c
|
util.c
|
||||||
ping.c)
|
ping.c)
|
||||||
|
|
||||||
if(SHARED_TOXCORE)
|
set(core_headers
|
||||||
|
DHT.h
|
||||||
|
network.h
|
||||||
|
Lossless_UDP.h
|
||||||
|
net_crypto.h
|
||||||
|
friend_requests.h
|
||||||
|
LAN_discovery.h
|
||||||
|
Messenger.h
|
||||||
|
util.h
|
||||||
|
ping.h)
|
||||||
|
|
||||||
add_library(toxcore SHARED ${core_sources})
|
add_library(toxcore SHARED ${core_sources})
|
||||||
else()
|
add_library(toxcore_static ${core_sources})
|
||||||
add_library(toxcore ${core_sources})
|
set_target_properties(toxcore_static PROPERTIES OUTPUT_NAME toxcore)
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY})
|
target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY})
|
||||||
|
|
||||||
|
install(TARGETS toxcore toxcore_static DESTINATION lib)
|
||||||
|
install(FILES ${core_headers} DESTINATION include)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(toxcore ws2_32)
|
target_link_libraries(toxcore ws2_32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user