1 cmake_minimum_required (VERSION 2.4)
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)
7 add_definitions (-DWINNT)
8 add_definitions (-D_CRT_SECURE_NO_WARNINGS)
9 SET(NSPARK_OS_SOURCE winnt.c)
11 add_definitions (-DRISCOS)
12 SET(NSPARK_OS_SOURCE acorn.c)
13 # FIXME: The following command requires CMake 2.8.12, while our current minimum is 2.4
14 add_compile_options(-mlibscl)
15 SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mlibscl")
17 add_definitions (-DPOSIX)
18 SET(NSPARK_OS_SOURCE unix.c)
21 if (CMAKE_COMPILER_IS_GNUCC)
22 set(CMAKE_C_FLAGS "-Wall")
23 endif (CMAKE_COMPILER_IS_GNUCC)
25 add_library (nsparklib ${NSPARK_LIB_SOURCE} ${NSPARK_OS_SOURCE})
27 add_executable (nspark arc.c main.c unarc.c)
28 target_link_libraries (nspark LINK_PUBLIC nsparklib)
29 install (TARGETS nspark DESTINATION bin)
31 add_executable (sqsh sqshmain.c unarc.c)
32 target_link_libraries (sqsh LINK_PUBLIC nsparklib)
33 install (TARGETS sqsh DESTINATION bin)
36 add_subdirectory (testprog)
39 install(FILES ${CMAKE_SOURCE_DIR}/man/nspark.1 DESTINATION share/man/man1)
40 install(FILES ${CMAKE_SOURCE_DIR}/man/sqsh.1 DESTINATION share/man/man1)
41 install(FILES ${CMAKE_SOURCE_DIR}/man/arcfs.5 DESTINATION share/man/man5)
42 install(FILES ${CMAKE_SOURCE_DIR}/man/spark.5 DESTINATION share/man/man5)