summaryrefslogtreecommitdiff
path: root/core/CMakeLists.txt
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-23 12:29:30 -0700
committerirungentoo <irungentoo@gmail.com>2013-08-23 12:29:30 -0700
commit05f3ae17346d7bcdd799346cab696d52bafe3a3a (patch)
tree1e40be2ca31927f3f33b4605f8abd31f20e3dc32 /core/CMakeLists.txt
parent4d89d63c3f1489e248261983f6c73a8b083b3336 (diff)
parentd746a01fbcc528f5584e2500cfd12ab2dd188316 (diff)
Merge pull request #518 from manuel-arguelles/make_install
Add entry to allow make install. Always build static and shared libraries
Diffstat (limited to 'core/CMakeLists.txt')
-rw-r--r--core/CMakeLists.txt23
1 files changed, 18 insertions, 5 deletions
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
15if(SHARED_TOXCORE) 15set(core_headers
16 add_library(toxcore SHARED ${core_sources}) 16 DHT.h
17else() 17 network.h
18 add_library(toxcore ${core_sources}) 18 Lossless_UDP.h
19endif() 19 net_crypto.h
20 friend_requests.h
21 LAN_discovery.h
22 Messenger.h
23 util.h
24 ping.h)
25
26add_library(toxcore SHARED ${core_sources})
27add_library(toxcore_static ${core_sources})
28set_target_properties(toxcore_static PROPERTIES OUTPUT_NAME toxcore)
20 29
21target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY}) 30target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY})
22 31
32install(TARGETS toxcore toxcore_static DESTINATION lib)
33install(FILES ${core_headers} DESTINATION include)
34
23if(WIN32) 35if(WIN32)
24 target_link_libraries(toxcore ws2_32) 36 target_link_libraries(toxcore ws2_32)
25endif() 37endif()
38