Browse Source

Update CMake configuration (and a few includes) to get p3prc compiling.

Sam Edwards 12 years ago
parent
commit
6c067883cc

+ 1 - 0
dtool/CMakeLists.txt

@@ -40,6 +40,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Configure.cmake)
 ## Include dtool subpackages ##
 add_subdirectory(src/dtoolbase)
 add_subdirectory(src/dtoolutil)
+add_subdirectory(src/prc)
 
 ## Include dtool metalibs ##
 add_subdirectory(metalibs/dtool)

+ 81 - 0
dtool/src/prc/CMakeLists.txt

@@ -0,0 +1,81 @@
+include_directories(${CMAKE_CURRENT_LIST_DIR}/../dtoolutil)
+include_directories(${CMAKE_CURRENT_LIST_DIR}/../dtoolbase)
+
+set(PRC_DCONFIG_TRUST_LEVEL 0 CACHE STRING "The trust level value for any legacy (DConfig) variables.")
+set(PRC_INC_TRUST_LEVEL 0 CACHE STRING "The amount by which we globally increment the trust level.")
+
+configure_file(${CMAKE_CURRENT_LIST_DIR}/prc_parameters.h.cmake
+               ${CMAKE_CURRENT_LIST_DIR}/prc_parameters.h)
+
+set(P3PRC_HEADER_FILES
+	bigEndian.h
+	config_prc.h
+	configDeclaration.I configDeclaration.h
+	configFlags.I configFlags.h
+	configPage.I configPage.h
+	configPageManager.I configPageManager.h
+	configVariable.I configVariable.h
+	configVariableBase.I configVariableBase.h
+	configVariableBool.I configVariableBool.h
+	configVariableCore.I configVariableCore.h
+	configVariableDouble.I configVariableDouble.h
+	configVariableEnum.I configVariableEnum.h
+	configVariableFilename.I configVariableFilename.h
+	configVariableInt.I configVariableInt.h
+	configVariableInt64.I configVariableInt64.h
+	configVariableList.I configVariableList.h
+	configVariableManager.I configVariableManager.h
+	configVariableSearchPath.I configVariableSearchPath.h
+	configVariableString.I configVariableString.h
+	encryptStreamBuf.h encryptStreamBuf.I encryptStream.h encryptStream.I
+	littleEndian.h
+	nativeNumericData.I nativeNumericData.h
+	pnotify.I pnotify.h
+	notifyCategory.I notifyCategory.h
+	notifyCategoryProxy.I notifyCategoryProxy.h
+	notifySeverity.h
+	prcKeyRegistry.h
+	reversedNumericData.I reversedNumericData.h
+	streamReader.I streamReader.h
+	streamWrapper.I streamWrapper.h
+	streamWriter.I streamWriter.h
+	prc_parameters.h)
+
+set(P3PRC_SOURCE_FILES
+	config_prc.cxx
+	configDeclaration.cxx
+	configFlags.cxx
+	configPage.cxx
+	configPageManager.cxx
+	configVariable.cxx
+	configVariableBase.cxx
+	configVariableBool.cxx
+	configVariableCore.cxx
+	configVariableDouble.cxx
+	configVariableEnum.cxx
+	configVariableFilename.cxx
+	configVariableInt.cxx
+	configVariableInt64.cxx
+	configVariableList.cxx
+	configVariableManager.cxx
+	configVariableSearchPath.cxx
+	configVariableString.cxx
+	encryptStreamBuf.cxx encryptStream.cxx
+	nativeNumericData.cxx
+	notify.cxx
+	notifyCategory.cxx
+	notifySeverity.cxx
+	prcKeyRegistry.cxx
+	reversedNumericData.cxx
+	streamReader.cxx streamWrapper.cxx streamWriter.cxx)
+
+foreach(FILENAME IN LISTS P3PRC_HEADER_FILES)
+	set(P3PRC_HEADERS ${P3PRC_HEADERS} ${CMAKE_CURRENT_LIST_DIR}/${FILENAME})
+endforeach()
+foreach(FILENAME IN LISTS P3PRC_SOURCE_FILES)
+	set(P3PRC_SOURCES ${P3PRC_SOURCES} ${CMAKE_CURRENT_LIST_DIR}/${FILENAME})
+endforeach()
+
+add_library(p3prc STATIC
+	${P3PRC_HEADERS}
+	${P3PRC_SOURCES})

+ 1 - 0
dtool/src/prc/configDeclaration.cxx

@@ -14,6 +14,7 @@
 
 #include "configDeclaration.h"
 #include "configVariableCore.h"
+#include "config_prc.h"
 #include "pstrtod.h"
 
 

+ 1 - 0
dtool/src/prc/configVariableBase.cxx

@@ -13,6 +13,7 @@
 ////////////////////////////////////////////////////////////////////
 
 #include "configVariableBase.h"
+#include "config_prc.h"
 
 ConfigVariableBase::Unconstructed *ConfigVariableBase::_unconstructed;
 

+ 1 - 0
dtool/src/prc/nativeNumericData.h

@@ -16,6 +16,7 @@
 #define NATIVENUMERICDATA_H
 
 #include "dtoolbase.h"
+#include "numeric_types.h"
 
 #include <string.h>  // for memcpy()
 

+ 56 - 0
dtool/src/prc/prc_parameters.h.cmake

@@ -0,0 +1,56 @@
+/* prc_parameters.h.  Generated automatically by CMake. */
+/********************************** DO NOT EDIT ****************************/
+
+
+/* The compiled-in default directory to look for the Configrc file, in
+   the absence of the PRC_DIR environment variable set, and in
+   the absence of anything specified via the configpath directive. */
+#define DEFAULT_PRC_DIR "@DEFAULT_PRC_DIR@"
+
+/* The compiled-in name of the environment variable(s) that contain
+   the name of a single directory in which to search for prc files. */
+#define PRC_DIR_ENVVARS "@PRC_DIR_ENVVARS@"
+
+/* The compiled-in name of the environment variable(s) that contain
+   the name of multiple directories, separated by DEFAULT_PATHSEP, in
+   which to search for prc files. */
+#define PRC_PATH_ENVVARS "@PRC_PATH_ENVVARS@"
+
+/* This is a special variable that is rarely used; it exists primarily
+   to support the Cygwin-based "ctattach" tools used by the Walt
+   Disney VR Studio.  This defines a set of environment variable(s)
+   that define a search path, as above; except that the directory
+   names on these search paths are Panda-style filenames, not
+   Windows-style filenames; and the path separator is always a space
+   character, regardless of DEFAULT_PATHSEP. */
+#define PRC_PATH2_ENVVARS "@PRC_PATH2_ENVVARS@"
+
+/* The filename(s) to search for in the above paths.  Normally this is
+   *.prc. */
+#define PRC_PATTERNS "@PRC_PATTERNS@"
+
+/* The filename(s) for encrypted prc files. */
+#define PRC_ENCRYPTED_PATTERNS "@PRC_ENCRYPTED_PATTERNS@"
+
+/* The encryption key used to decrypt any encrypted prc files
+   identified by PRC_ENCRYPTED_PATTERNS. */
+#define PRC_ENCRYPTION_KEY "@PRC_ENCRYPTION_KEY@"
+
+/* The filename(s) to search for, and execute, in the above paths.
+   Normally this is empty. */
+#define PRC_EXECUTABLE_PATTERNS "@PRC_EXECUTABLE_PATTERNS@"
+
+/* The environment variable that defines optional args to pass to
+   executables found that match one of the above patterns. */
+#define PRC_EXECUTABLE_ARGS_ENVVAR "@PRC_EXECUTABLE_ARGS_ENVVAR@"
+
+/* Define if we want to enable the "trust_level" feature of prc config
+   variables.  This requires OpenSSL and PRC_PUBLIC_KEYS_FILENAME,
+   above. */
+#cmakedefine PRC_RESPECT_TRUST_LEVEL
+
+/* The trust level value for any legacy (DConfig) variables. */
+#define PRC_DCONFIG_TRUST_LEVEL @PRC_DCONFIG_TRUST_LEVEL@
+
+/* The amount by which we globally increment the trust level. */
+#define PRC_INC_TRUST_LEVEL @PRC_INC_TRUST_LEVEL@