2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 14:37:41 +00:00

Add Python check in cmake process to allow optional resource.dat creation.

This commit is contained in:
2011-07-23 16:34:25 -07:00
parent 90223e723e
commit 0a0bfa56d0
2 changed files with 44 additions and 1 deletions

View File

@ -15,6 +15,18 @@ include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${PYTHON_INCLUDE_DIR})
include_directories(${CURL_INCLUDE_DIR})
# Test for Python Interpreter, which will be used for extra build scripts if available
find_package(PythonInterp)
if(PYTHONINTERP_FOUND)
include(FindPythonModule)
# Test for Python modules needed to build resource.dat
find_python_module(rsvg)
find_python_module(Image)
if((DEFINED PY_RSVG) AND (DEFINED PY_IMAGE))
set(BUILD_RESOURCE_DAT ON)
endif((DEFINED PY_RSVG) AND (DEFINED PY_IMAGE))
endif(PYTHONINTERP_FOUND)
add_subdirectory(external)
set(plClient_HEADERS
@ -51,7 +63,9 @@ set(plClient_RESOURCES
add_executable(plClient WIN32 ${plClient_SOURCES} ${plClient_HEADERS}
${plClient_TEXT} ${plClient_RESOURCES})
add_dependencies(plClient externalResources)
if(BUILD_RESOURCE_DAT)
add_dependencies(plClient externalResources)
endif(BUILD_RESOURCE_DAT)
if(PLASMA_EXTERNAL_RELEASE)
set_target_properties(plClient PROPERTIES OUTPUT_NAME "UruExplorer")