aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2014-07-10 22:06:10 -0500
committerBrent Cook <bcook@openbsd.org>2015-07-21 12:08:18 -0500
commit5d8a1cf7155130bd8101090d7e1d0c2f90d9b123 (patch)
tree286f7d12e3647f94bd1e6e8e180a4bf6215a0740 /apps
parent7a4a37cf596697ae96eeb1c555989e6d1a443187 (diff)
downloadportable-5d8a1cf7155130bd8101090d7e1d0c2f90d9b123.tar.gz
portable-5d8a1cf7155130bd8101090d7e1d0c2f90d9b123.tar.bz2
portable-5d8a1cf7155130bd8101090d7e1d0c2f90d9b123.zip
add initial CMake and Visual Studio build support
This moves the compatibility include files from include to include/compat so we can use the awful MS C compiler <../include/> trick to emulate the GNU #include_next extension. This also removes a few old compat files we do not need anymore.
Diffstat (limited to 'apps')
-rw-r--r--apps/CMakeLists.txt84
-rw-r--r--apps/Makefile.am1
2 files changed, 85 insertions, 0 deletions
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
new file mode 100644
index 0000000..13d6e9c
--- /dev/null
+++ b/apps/CMakeLists.txt
@@ -0,0 +1,84 @@
1include_directories(
2 .
3 ../include
4 ../include/compat
5)
6
7set(
8 OPENSSL_SRC
9 apps.c
10 asn1pars.c
11 ca.c
12 ciphers.c
13 cms.c
14 crl.c
15 crl2p7.c
16 dgst.c
17 dh.c
18 dhparam.c
19 dsa.c
20 dsaparam.c
21 ec.c
22 ecparam.c
23 enc.c
24 engine.c
25 errstr.c
26 gendh.c
27 gendsa.c
28 genpkey.c
29 genrsa.c
30 nseq.c
31 ocsp.c
32 openssl.c
33 passwd.c
34 pkcs12.c
35 pkcs7.c
36 pkcs8.c
37 pkey.c
38 pkeyparam.c
39 pkeyutl.c
40 prime.c
41 rand.c
42 req.c
43 rsa.c
44 rsautl.c
45 s_cb.c
46 s_client.c
47 s_server.c
48 s_socket.c
49 s_time.c
50 sess_id.c
51 smime.c
52 speed.c
53 spkac.c
54 ts.c
55 verify.c
56 version.c
57 x509.c
58)
59
60if(CMAKE_HOST_UNIX)
61 set(OPENSSL_SRC ${OPENSSL_SRC} apps_posix.c)
62 set(OPENSSL_SRC ${OPENSSL_SRC} certhash.c)
63endif()
64
65if(CMAKE_HOST_WIN32)
66 set(OPENSSL_SRC ${OPENSSL_SRC} apps_win.c)
67 set(OPENSSL_SRC ${OPENSSL_SRC} certhash_disabled.c)
68 set(OPENSSL_SRC ${OPENSSL_SRC} poll_win.c)
69endif()
70
71check_function_exists(strtonum HAVE_STRTONUM)
72if(HAVE_STRTONUM)
73 add_definitions(-DHAVE_STRTONUM)
74else()
75 set(OPENSSL_SRC ${OPENSSL_SRC} strtonum.c)
76endif()
77
78set(OPENSSL_LIBS ssl crypto)
79if(CMAKE_HOST_WIN32)
80 set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32)
81endif()
82
83add_executable(openssl ${OPENSSL_SRC})
84target_link_libraries(openssl ${OPENSSL_LIBS})
diff --git a/apps/Makefile.am b/apps/Makefile.am
index 0547876..ce78b33 100644
--- a/apps/Makefile.am
+++ b/apps/Makefile.am
@@ -88,6 +88,7 @@ noinst_HEADERS += timeouts.h
88EXTRA_DIST = cert.pem 88EXTRA_DIST = cert.pem
89EXTRA_DIST += openssl.cnf 89EXTRA_DIST += openssl.cnf
90EXTRA_DIST += x509v3.cnf 90EXTRA_DIST += x509v3.cnf
91EXTRA_DIST += CMakeLists.txt
91 92
92install-exec-hook: 93install-exec-hook:
93 @if [ "@OPENSSLDIR@x" != "x" ]; then \ 94 @if [ "@OPENSSLDIR@x" != "x" ]; then \