diff options
author | Brent Cook <busterb@gmail.com> | 2014-07-10 22:06:10 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-07-21 12:08:18 -0500 |
commit | 5d8a1cf7155130bd8101090d7e1d0c2f90d9b123 (patch) | |
tree | 286f7d12e3647f94bd1e6e8e180a4bf6215a0740 /apps | |
parent | 7a4a37cf596697ae96eeb1c555989e6d1a443187 (diff) | |
download | portable-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.txt | 84 | ||||
-rw-r--r-- | apps/Makefile.am | 1 |
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 @@ | |||
1 | include_directories( | ||
2 | . | ||
3 | ../include | ||
4 | ../include/compat | ||
5 | ) | ||
6 | |||
7 | set( | ||
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 | |||
60 | if(CMAKE_HOST_UNIX) | ||
61 | set(OPENSSL_SRC ${OPENSSL_SRC} apps_posix.c) | ||
62 | set(OPENSSL_SRC ${OPENSSL_SRC} certhash.c) | ||
63 | endif() | ||
64 | |||
65 | if(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) | ||
69 | endif() | ||
70 | |||
71 | check_function_exists(strtonum HAVE_STRTONUM) | ||
72 | if(HAVE_STRTONUM) | ||
73 | add_definitions(-DHAVE_STRTONUM) | ||
74 | else() | ||
75 | set(OPENSSL_SRC ${OPENSSL_SRC} strtonum.c) | ||
76 | endif() | ||
77 | |||
78 | set(OPENSSL_LIBS ssl crypto) | ||
79 | if(CMAKE_HOST_WIN32) | ||
80 | set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32) | ||
81 | endif() | ||
82 | |||
83 | add_executable(openssl ${OPENSSL_SRC}) | ||
84 | target_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 | |||
88 | EXTRA_DIST = cert.pem | 88 | EXTRA_DIST = cert.pem |
89 | EXTRA_DIST += openssl.cnf | 89 | EXTRA_DIST += openssl.cnf |
90 | EXTRA_DIST += x509v3.cnf | 90 | EXTRA_DIST += x509v3.cnf |
91 | EXTRA_DIST += CMakeLists.txt | ||
91 | 92 | ||
92 | install-exec-hook: | 93 | install-exec-hook: |
93 | @if [ "@OPENSSLDIR@x" != "x" ]; then \ | 94 | @if [ "@OPENSSLDIR@x" != "x" ]; then \ |