toxcore/CMakeLists.txt

24 lines
463 B
CMake
Raw Normal View History

2013-06-25 08:55:30 +08:00
cmake_minimum_required(VERSION 2.6.0)
2013-06-26 13:03:35 +08:00
project(TOX C)
2013-06-25 08:55:30 +08:00
set(core_sources
#core/DHT.c
core/network.c)
2013-06-25 08:55:30 +08:00
set(test_sources
testing/DHT_test.c)
2013-06-26 13:03:35 +08:00
set(exe_name TOX-app)
2013-06-25 08:55:30 +08:00
2013-06-26 13:03:35 +08:00
add_executable(${exe_name}
2013-06-25 08:55:30 +08:00
${core_sources}
${test_sources})
if(WIN32)
2013-06-26 13:03:35 +08:00
target_link_libraries(${exe_name} ws2_32)
endif()
if(CMAKE_COMPILER_IS_GNUCC)
message(STATUS "==== GCC detected - Adding compiler flags")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
endif()