summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: 02bf57cd4c3e1746544547e04f6447fa4141083b (plain)
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
cmake_minimum_required (VERSION 2.6)
project (NetLemmings)

# The version number.
set (NetLemmings_VERSION_MAJOR 0)
set (NetLemmings_VERSION_MINOR 1)
 
# Check if all necessary libs are here
find_package(SDL REQUIRED)
find_package(SDL_net REQUIRED)

# configure a header file to pass some of the CMake settings
# to the source code
configure_file (
	"${PROJECT_SOURCE_DIR}/netlem.h.in"
	"${PROJECT_BINARY_DIR}/netlem.h"
)
 
# add the binary tree to the search path for include files
# so that we will find NetLemmingsConfig.h
include_directories("${PROJECT_BINARY_DIR}")

add_executable(netlem netlem.c)
add_definitions(-Wall -Wextra -pedantic -Werror -std=c99)
target_link_libraries(netlem SDL SDL_net)