1 cmake_minimum_required (VERSION 2.4)
2 if (CMAKE_VERSION GREATER "2.4")
3 cmake_policy(SET CMP0005 OLD)
4 endif (CMAKE_VERSION GREATER "2.4")
6 if (CMAKE_VERSION GREATER "3.1")
7 cmake_policy(SET CMP0054 OLD)
8 endif (CMAKE_VERSION GREATER "3.1")
12 SET(NSPARK_LIB_SOURCE arcfs.c compress.c crc.c date.c error.c garble.c io.c misc.c pack.c store.c)
15 add_definitions (-DPOSIX)
16 SET(NSPARK_OS_SOURCE unix.c)
20 add_definitions (-DWINNT)
21 add_definitions (-D_CRT_SECURE_NO_WARNINGS)
22 SET(NSPARK_OS_SOURCE winnt.c)
25 if (CMAKE_COMPILER_IS_GNUCC)
26 set(CMAKE_C_FLAGS "-Wall")
27 endif (CMAKE_COMPILER_IS_GNUCC)
29 add_library (nsparklib ${NSPARK_LIB_SOURCE} ${NSPARK_OS_SOURCE})
30 add_executable (nspark arc.c main.c unarc.c)
31 target_link_libraries (nspark LINK_PUBLIC nsparklib)
32 add_executable (sqsh sqshmain.c unarc.c)
33 target_link_libraries (sqsh LINK_PUBLIC nsparklib)
36 add_subdirectory (testprog)