summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasn <asn@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-10-19 17:43:59 +0000
committerasn <asn@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-10-19 17:43:59 +0000
commitc38ea60c59612809310441ba66e22f99045d2c18 (patch)
tree85ad26491fad771d423eaace945370f8e65816ef
parent6566560fc817a82fce01780f8830d8adcca5c935 (diff)
downloadpki-c38ea60c59612809310441ba66e22f99045d2c18.tar.gz
pki-c38ea60c59612809310441ba66e22f99045d2c18.tar.xz
pki-c38ea60c59612809310441ba66e22f99045d2c18.zip
cmake: Addded native-tools tkstool executable.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1375 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
-rw-r--r--pki/CMakeLists.txt2
-rw-r--r--pki/ConfigureChecks.cmake17
-rw-r--r--pki/base/native-tools/src/CMakeLists.txt1
-rw-r--r--pki/base/native-tools/src/tkstool/CMakeLists.txt47
-rw-r--r--pki/config.h.cmake5
5 files changed, 61 insertions, 11 deletions
diff --git a/pki/CMakeLists.txt b/pki/CMakeLists.txt
index 661418fef..2a4e33995 100644
--- a/pki/CMakeLists.txt
+++ b/pki/CMakeLists.txt
@@ -47,5 +47,7 @@ find_package(Threads)
include(ConfigureChecks.cmake)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+add_definitions(-DHAVE_CONFIG_H)
+
# check subdirectories
add_subdirectory(base)
diff --git a/pki/ConfigureChecks.cmake b/pki/ConfigureChecks.cmake
index d7ffb5569..75a8f16a0 100644
--- a/pki/ConfigureChecks.cmake
+++ b/pki/ConfigureChecks.cmake
@@ -40,19 +40,14 @@ if(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
endif (NOT GNUCC_VERSION EQUAL 34)
endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
-# HEADER FILES
-check_include_file(argp.h HAVE_ARGP_H)
-check_include_file(pty.h HAVE_PTY_H)
-check_include_file(terminos.h HAVE_TERMIOS_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/aes.h HAVE_OPENSSL_AES_H)
+# PLATTFORM
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/blowfish.h HAVE_OPENSSL_BLOWFISH_H)
+if (UNIX AND NOT WIN32)
+ set(XP_UNIX 1)
+endif (UNIX AND NOT WIN32)
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
+# HEADER FILES
+check_include_file(argp.h HAVE_ARGP_H)
if (CMAKE_HAVE_PTHREAD_H)
set(HAVE_PTHREAD_H 1)
diff --git a/pki/base/native-tools/src/CMakeLists.txt b/pki/base/native-tools/src/CMakeLists.txt
index bcda24541..0328738ac 100644
--- a/pki/base/native-tools/src/CMakeLists.txt
+++ b/pki/base/native-tools/src/CMakeLists.txt
@@ -3,3 +3,4 @@ add_subdirectory(p7tool)
add_subdirectory(revoker)
add_subdirectory(setpin)
add_subdirectory(sslget)
+add_subdirectory(tkstool)
diff --git a/pki/base/native-tools/src/tkstool/CMakeLists.txt b/pki/base/native-tools/src/tkstool/CMakeLists.txt
new file mode 100644
index 000000000..5d58d0554
--- /dev/null
+++ b/pki/base/native-tools/src/tkstool/CMakeLists.txt
@@ -0,0 +1,47 @@
+project(tkstool C)
+
+find_package(MozLDAP REQUIRED)
+
+set(TKSTOOL_PRIVATE_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${NSPR_INCLUDE_DIRS}
+ ${NSS_INCLUDE_DIRS}
+)
+
+set(TKSTOOL_LINK_LIBRARIES
+ ${NSPR_LIBRARIES}
+ ${NSS_LIBRARIES}
+)
+
+set(tkstool_SRCS
+ delete.c
+ file.c
+ find.c
+ help.c
+ key.c
+ list.c
+ modules.c
+ pppolicy.c
+ random.c
+ retrieve.c
+ secerror.c
+ secpwd.c
+ secutil.c
+ tkstool.c
+ util.c
+ version.c
+)
+
+include_directories(${TKSTOOL_PRIVATE_INCLUDE_DIRS})
+
+add_executable(tkstool ${tkstool_SRCS})
+
+target_link_libraries(tkstool ${TKSTOOL_LINK_LIBRARIES})
+
+install(
+ TARGETS tkstool
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+)
diff --git a/pki/config.h.cmake b/pki/config.h.cmake
index 31551b593..56375abc6 100644
--- a/pki/config.h.cmake
+++ b/pki/config.h.cmake
@@ -34,6 +34,11 @@
/* Define to 1 if you want to enable ZLIB */
#cmakedefine WITH_LIBZ 1
+/**************************** PLATTFORM ****************************/
+
+#cmakedefine XP_UNIX 1
+#cmakedefine VMS 1
+
/*************************** ENDIAN *****************************/
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most