diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..02bf57c --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,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) + |