comparison cinst/CMakeLists.txt @ 223:d29997e09177

NSS first Blood. Added code to list certs in found stores.
author Sascha Wilde <wilde@intevation.de>
date Thu, 27 Mar 2014 12:46:46 +0100
parents 642d81594665
children 689b94dd89a9
comparison
equal deleted inserted replaced
220:e6c5c70a67b0 223:d29997e09177
6 6
7 set(CINST_SOURCES 7 set(CINST_SOURCES
8 ${CMAKE_CURRENT_SOURCE_DIR}/windowsstore.c 8 ${CMAKE_CURRENT_SOURCE_DIR}/windowsstore.c
9 ${CMAKE_CURRENT_SOURCE_DIR}/main.c 9 ${CMAKE_CURRENT_SOURCE_DIR}/main.c
10 ) 10 )
11 add_executable(cinst ${CINST_SOURCES})
11 12
12 set(MOZILLA_SOURCES
13 ${CMAKE_CURRENT_SOURCE_DIR}/mozilla.c
14 )
15
16 add_executable(cinst ${CINST_SOURCES})
17 add_executable(mozilla ${MOZILLA_SOURCES})
18 if (WIN32) 13 if (WIN32)
19 set(WIN_EXTRA_LIBS -lcrypt32) 14 set(WIN_EXTRA_LIBS -lcrypt32)
20 endif(WIN32) 15 endif(WIN32)
21 16
22 target_link_libraries(cinst 17 target_link_libraries(cinst
25 ${POLARSSL_LIBRARIES} 20 ${POLARSSL_LIBRARIES}
26 ${WIN_EXTRA_LIBS}) 21 ${WIN_EXTRA_LIBS})
27 22
28 install(TARGETS cinst DESTINATION bin) 23 install(TARGETS cinst DESTINATION bin)
29 24
30 target_link_libraries(mozilla 25 # ----------------------------------------------------------------------
26 # Mozilla nss store specific certificate installer:
27
28 include(FindPkgConfig)
29 # FIXME: maybe a minimal version would be wise...
30 pkg_check_modules (NSS nss)
31 include_directories(${NSS_INCLUDE_DIRS})
32
33 if(NSS_FOUND)
34 set(MOZILLA_SOURCES
35 ${CMAKE_CURRENT_SOURCE_DIR}/mozilla.c
36 )
37 add_executable(mozilla ${MOZILLA_SOURCES})
38 target_link_libraries(mozilla
31 m13_common 39 m13_common
32 ${POLARSSL_LIBRARIES} 40 ${POLARSSL_LIBRARIES}
41 ${NSS_LIBRARIES}
33 ${PROFILING_LIBS}) 42 ${PROFILING_LIBS})
34 43 set_target_properties(mozilla PROPERTIES COMPILE_FLAGS "-std=c99")
35 set_target_properties(mozilla PROPERTIES COMPILE_FLAGS "-std=c99") 44 install(TARGETS mozilla DESTINATION bin)
36 45 else()
37 install(TARGETS mozilla DESTINATION bin) 46 message(STATUS "WARNING: Could not find nss. Mozilla cert installer will not be build!")
47 endif()

http://wald.intevation.org/projects/trustbridge/