Mercurial > trustbridge
diff 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 |
line wrap: on
line diff
--- a/cinst/CMakeLists.txt Wed Mar 26 20:21:55 2014 +0100 +++ b/cinst/CMakeLists.txt Thu Mar 27 12:46:46 2014 +0100 @@ -8,13 +8,8 @@ ${CMAKE_CURRENT_SOURCE_DIR}/windowsstore.c ${CMAKE_CURRENT_SOURCE_DIR}/main.c ) +add_executable(cinst ${CINST_SOURCES}) -set(MOZILLA_SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/mozilla.c -) - -add_executable(cinst ${CINST_SOURCES}) -add_executable(mozilla ${MOZILLA_SOURCES}) if (WIN32) set(WIN_EXTRA_LIBS -lcrypt32) endif(WIN32) @@ -27,11 +22,26 @@ install(TARGETS cinst DESTINATION bin) -target_link_libraries(mozilla +# ---------------------------------------------------------------------- +# Mozilla nss store specific certificate installer: + +include(FindPkgConfig) +# FIXME: maybe a minimal version would be wise... +pkg_check_modules (NSS nss) +include_directories(${NSS_INCLUDE_DIRS}) + +if(NSS_FOUND) + set(MOZILLA_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/mozilla.c + ) + add_executable(mozilla ${MOZILLA_SOURCES}) + target_link_libraries(mozilla m13_common ${POLARSSL_LIBRARIES} + ${NSS_LIBRARIES} ${PROFILING_LIBS}) - -set_target_properties(mozilla PROPERTIES COMPILE_FLAGS "-std=c99") - -install(TARGETS mozilla DESTINATION bin) + set_target_properties(mozilla PROPERTIES COMPILE_FLAGS "-std=c99") + install(TARGETS mozilla DESTINATION bin) +else() + message(STATUS "WARNING: Could not find nss. Mozilla cert installer will not be build!") +endif()