mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 19:59:09 +00:00
CMakeify plPythonPack
This commit is contained in:
@ -2,3 +2,4 @@ add_definitions(-D_LIB) # We shouldn't actually need this here, but
|
|||||||
# Cyan uses it, so meh
|
# Cyan uses it, so meh
|
||||||
|
|
||||||
add_subdirectory(plClient)
|
add_subdirectory(plClient)
|
||||||
|
add_subdirectory(plPythonPack)
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
include_directories(../../CoreLib)
|
||||||
|
include_directories(../../PubUtilLib)
|
||||||
|
|
||||||
|
include_directories(${PYTHON_INCLUDE_DIR})
|
||||||
|
|
||||||
|
set(plPythonPack_SOURCES
|
||||||
|
main.cpp
|
||||||
|
PythonInterface.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(plPythonPack_HEADERS
|
||||||
|
PythonInterface.h
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(plPythonPack ${plPythonPack_SOURCES} ${plPythonPack_HEADERS})
|
||||||
|
target_link_libraries(plPythonPack ${PYTHON_LIBRARY} CoreLib CoreLibExe plFile)
|
||||||
|
|
||||||
|
source_group("Source Files" FILES ${plPythonPack_SOURCES})
|
||||||
|
source_group("Header Files" FILES ${plPythonPack_HEADERS})
|
@ -139,7 +139,11 @@ hsBool PythonInterface::DumpObject(PyObject* pyobj, char** pickle, Int32* size)
|
|||||||
{
|
{
|
||||||
PyObject *s; // the python string object where the marsalled object wil go
|
PyObject *s; // the python string object where the marsalled object wil go
|
||||||
// convert object to a marshalled string python object
|
// convert object to a marshalled string python object
|
||||||
|
#if (PY_MAJOR_VERSION == 2) && (PY_MINOR_VERSION < 4)
|
||||||
s = PyMarshal_WriteObjectToString(pyobj);
|
s = PyMarshal_WriteObjectToString(pyobj);
|
||||||
|
#else
|
||||||
|
s = PyMarshal_WriteObjectToString(pyobj, 0);
|
||||||
|
#endif
|
||||||
// did it actually do it?
|
// did it actually do it?
|
||||||
if ( s != NULL )
|
if ( s != NULL )
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
|
|
||||||
*==LICENSE==*/
|
*==LICENSE==*/
|
||||||
#include "hsStream.h"
|
#include "hsStream.h"
|
||||||
#include "../plFile/hsFiles.h"
|
#include "plFile/hsFiles.h"
|
||||||
|
|
||||||
#include "PythonInterface.h"
|
#include "PythonInterface.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user