<commit_before># Define target name and output directory
init_target (PythonScriptModule OUTPUT plugins)

# Get EC defines that are added to this build.
GetEntityComponents()

# Define source files
# todo: check the moc list and in general what can be removed.
file (GLOB CPP_FILES *.cpp)
file (GLOB H_FILES *.h)
file (GLOB XML_FILES *.xml)
file (GLOB MOC_FILES PythonScriptModule.h PythonQtScriptingConsole.h TundraWrapper.h)
set (SOURCE_FILES ${CPP_FILES} ${H_FILES})

# Qt4 Wrap
QT4_WRAP_CPP(MOC_SRCS ${MOC_FILES})
QT4_WRAP_UI(UI_SRCS ${UI_FILES})
QT4_ADD_RESOURCES(RESOURCE_SRCS ${RESOURCE_FILES})

set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${H_FILES} ${CPP_FILES} PARENT_SCOPE)

add_definitions (-DPYMODULE_MODULE_EXPORTS)

# Use python and python qt. 
# Boost/Ogre includes are automatic.
use_package (PYTHON)
use_package (PYTHON_QT)

# Use core and app modules we need. Notice separate macros due to source locations separation.
UseTundraCore()
use_core_modules(TundraCore Math OgreRenderingModule TundraProtocolModule)

# Build PythonScriptModule
build_library (${TARGET_NAME} SHARED ${SOURCE_FILES} ${MOC_SRCS})

# Link to all: this include core and app (as the linking is just done by name not absolute path)
link_modules(TundraCore OgreRenderingModule TundraProtocolModule)

# Link to ECs. This macro will smartly opt out ECs that are not included in the build, info for this provided by GetEntityComponents() on top.
link_entity_components (EC_Script C_Highlight EC_HoveringText EC_Sound EC_TransformGizmo
                        EC_PlanarMirror EC_ProximityTrigger)

# Use python, pythonqt and ogre
link_package (PYTHON)
link_package (PYTHON_QT)
link_ogre()

# Use PCH with StableHeaders.h
SetupCompileFlagsWithPCH()

# Finalize our target, this will do some nice automation for us.
final_target ()

# make install: Install files
setup_install_directory (${TUNDRA_BIN}/pyplugins)

# make install: Install windows deps<commit_msg>oops fix a typo in previous, failed to test properly as didn't remember that cmake checks py usage from an env var nowadays too<commit_after># Define target name and output directory
init_target (PythonScriptModule OUTPUT plugins)

# Get EC defines that are added to this build.
GetEntityComponents()

# Define source files
# todo: check the moc list and in general what can be removed.
file (GLOB CPP_FILES *.cpp)
file (GLOB H_FILES *.h)
file (GLOB XML_FILES *.xml)
file (GLOB MOC_FILES PythonScriptModule.h PythonQtScriptingConsole.h TundraWrapper.h)
set (SOURCE_FILES ${CPP_FILES} ${H_FILES})

# Qt4 Wrap
QT4_WRAP_CPP(MOC_SRCS ${MOC_FILES})
QT4_WRAP_UI(UI_SRCS ${UI_FILES})
QT4_ADD_RESOURCES(RESOURCE_SRCS ${RESOURCE_FILES})

set (FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${H_FILES} ${CPP_FILES} PARENT_SCOPE)

add_definitions (-DPYMODULE_MODULE_EXPORTS)

# Use python and python qt. 
# Boost/Ogre includes are automatic.
use_package (PYTHON)
use_package (PYTHON_QT)

# Use core and app modules we need. Notice separate macros due to source locations separation.
UseTundraCore()
use_core_modules(TundraCore Math OgreRenderingModule TundraProtocolModule)

# Build PythonScriptModule
build_library (${TARGET_NAME} SHARED ${SOURCE_FILES} ${MOC_SRCS})

# Link to all: this include core and app (as the linking is just done by name not absolute path)
link_modules(TundraCore OgreRenderingModule TundraProtocolModule)

# Link to ECs. This macro will smartly opt out ECs that are not included in the build, info for this provided by GetEntityComponents() on top.
link_entity_components (EC_Script EC_Highlight EC_HoveringText EC_Sound EC_TransformGizmo EC_PlanarMirror EC_ProximityTrigger)

# Use python, pythonqt and ogre
link_package (PYTHON)
link_package (PYTHON_QT)
link_ogre()

# Use PCH with StableHeaders.h
SetupCompileFlagsWithPCH()

# Finalize our target, this will do some nice automation for us.
final_target ()

# make install: Install files
setup_install_directory (${TUNDRA_BIN}/pyplugins)

# make install: Install windows deps
{'fraction_non_alphanumeric': 0.06979663570173236, 'fraction_numerical': 0.002008536279186543, 'mean_word_length': 6.088967971530249, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4620374', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1270, 'n_words': 436}