forked from codeplea/genann
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (35 loc) · 1.12 KB
/
CMakeLists.txt
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Based on franzflasch
cmake_minimum_required(VERSION 2.8.4)
project (genann)
enable_testing()
IF(CMAKE_HOST_UNIX)
SET(M, m)
ELSE()
SET(M, "")
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
ENDIF()
add_library(genann genann.c)
target_link_libraries(genann ${M})
add_executable(genann_test genann_test.c)
target_link_libraries(genann_test genann)
add_test(genann_test genann_test WORKING_DIRECTORY ..)
OPTION(WITH_EXAMPLES "Also build examples" OFF) # Enabled by default
IF(WITH_EXAMPLES)
add_executable(example1 example1.c)
target_link_libraries(example1 genann)
add_executable(example2 example2.c)
target_link_libraries(example2 genann)
add_executable(example3 example3.c)
target_link_libraries(example3 genann)
add_executable(example4 example4.c)
target_link_libraries(example4 genann)
ENDIF(WITH_EXAMPLES)
install (TARGETS genann
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
### Debian Package generation
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_VERSION "0.1.0")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "https://github.com/codeplea/genann")
include(CPack)