[PATCH] Add a pesodo config file for inlcude directories and library names

Wald Commits scm-commit at wald.intevation.org
Mon Jul 28 13:00:09 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1406545206 -7200
# Node ID 247cffdc9b893164491d6cdd00edabccf32b2077
# Parent  1e5118fa0cb1e483c7f696a774da944c10b3b00a
Add a pesodo config file for inlcude directories and library names

diff -r 1e5118fa0cb1 -r 247cffdc9b89 CMakeLists.txt
--- a/CMakeLists.txt	Mon Jul 28 10:47:06 2014 +0200
+++ b/CMakeLists.txt	Mon Jul 28 13:00:06 2014 +0200
@@ -5,29 +5,34 @@
 # and comes with ABSOLUTELY NO WARRANTY!
 # See LICENSE.txt for details.
 
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/sqlite)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nspr/pr/include)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nspr/pr/include/private)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nspr/lib/ds)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nspr/lib/libc/include)
+include (nss-cmake-static)
+set(NSS_INCLUDE_DIRS
+   ${CMAKE_CURRENT_BINARY_DIR}
+   ${CMAKE_CURRENT_SOURCE_DIR}/sqlite
+   ${CMAKE_CURRENT_SOURCE_DIR}/nspr/pr/include
+   ${CMAKE_CURRENT_SOURCE_DIR}/nspr/pr/include/private
+   ${CMAKE_CURRENT_SOURCE_DIR}/nspr/lib/ds
+   ${CMAKE_CURRENT_SOURCE_DIR}/nspr/lib/libc/include
 
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/base)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/certdb)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/certhigh)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/cryptohi)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/dev)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl/ecl)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl/mpi)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/nss)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pk11wrap)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pkcs7)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pki)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/smime)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/softoken)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/ssl)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/util)
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/base
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/certdb
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/certhigh
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/cryptohi
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/dev
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl/ecl
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/freebl/mpi
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/nss
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pk11wrap
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pkcs7
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/pki
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/smime
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/softoken
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/ssl
+   ${CMAKE_CURRENT_SOURCE_DIR}/nss/lib/util
+)
+
+include_directories(${NSS_INCLUDE_DIRS})
 
 set (COMMON_DEFINITIONS "-DWIN32 -D_WIN32_WINNT=0x602 -D_NSPR_BUILD -DFORCE_PR_LOG -DXP_PC")
 set (COMMON_DEFINITIONS "${COMMON_DEFINITIONS} -DWIN95 -D_PR_GLOBAL_THREADS_ONLY -D_X86_ -UWINNT")
diff -r 1e5118fa0cb1 -r 247cffdc9b89 nss-cmake-static.cmake
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nss-cmake-static.cmake	Mon Jul 28 13:00:06 2014 +0200
@@ -0,0 +1,42 @@
+# Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
+# Software engineering by Intevation GmbH
+#
+# This file is Free Software under the GNU GPL (v>=2)
+# and comes with ABSOLUTELY NO WARRANTY!
+# See LICENSE.txt for details.
+
+if (NOT EXISTS "${NSS_STATIC_PATH}")
+   set (NSS_STATIC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
+
+set(NSS_INCLUDE_DIRS
+   ${CMAKE_CURRENT_BINARY_DIR}
+   ${NSS_STATIC_PATH}/sqlite
+   ${NSS_STATIC_PATH}/nspr/pr/include
+   ${NSS_STATIC_PATH}/nspr/pr/include/private
+   ${NSS_STATIC_PATH}/nspr/lib/ds
+   ${NSS_STATIC_PATH}/nspr/lib/libc/include
+
+   ${NSS_STATIC_PATH}/nss/lib/base
+   ${NSS_STATIC_PATH}/nss/lib/certdb
+   ${NSS_STATIC_PATH}/nss/lib/certhigh
+   ${NSS_STATIC_PATH}/nss/lib/cryptohi
+   ${NSS_STATIC_PATH}/nss/lib/dev
+   ${NSS_STATIC_PATH}/nss/lib/freebl
+   ${NSS_STATIC_PATH}/nss/lib/freebl/ecl
+   ${NSS_STATIC_PATH}/nss/lib/freebl/mpi
+   ${NSS_STATIC_PATH}/nss/lib/nss
+   ${NSS_STATIC_PATH}/nss/lib/pk11wrap
+   ${NSS_STATIC_PATH}/nss/lib/pkcs7
+   ${NSS_STATIC_PATH}/nss/lib/pki
+   ${NSS_STATIC_PATH}/nss/lib/smime
+   ${NSS_STATIC_PATH}/nss/lib/softoken
+   ${NSS_STATIC_PATH}/nss/lib/ssl
+   ${NSS_STATIC_PATH}/nss/lib/util
+)
+
+set(NSS_LIBRARIES nss_static nspr_static)
+
+if (WIN32)
+   set(NSS_LIBRARIES ${NSS_LIBARIES} winmm ws2_32)
+endif()


More information about the Trustbridge-commits mailing list