Fix WINNT build.
[debian-nspark.git] / CMakeLists.txt
blob0f6a7a57445331119b396d83ead04a530dc8b58c
1 cmake_minimum_required (VERSION 2.4)
2 project (nspark C)
4 SET(NSPARK_LIB_SOURCE arcfs.c compress.c crc.c date.c error.c garble.c io.c misc.c pack.c store.c)
6 if (UNIX)
7         add_definitions (-DPOSIX)
8         SET(NSPARK_OS_SOURCE unix.c)
9 endif (UNIX)
11 if (WIN32)
12         add_definitions (-DWINNT)
13         SET(NSPARK_OS_SOURCE winnt.c)
14 endif (WIN32)
16 add_executable (nspark arc.c main.c unarc.c ${NSPARK_LIB_SOURCE} ${NSPARK_OS_SOURCE})
18 if (UNIX)
19         add_executable (testprog/testpack testprog/pack.c ${NSPARK_LIB_SOURCE} ${NSPARK_OS_SOURCE})
20 endif (UNIX)