mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-26 10:03:48 +00:00
Fix Dynamic Library builds on Windows
This commit is contained in:
parent
d05d9b6cf1
commit
a4e3a000fb
3 changed files with 10 additions and 2 deletions
|
|
@ -371,6 +371,9 @@ elseif (WIN32)
|
|||
|
||||
# NOTE: On Windows, /Zc:wchar_t- is necessary otherwise you get unicode errors
|
||||
set_target_properties(${TORQUE_APP_NAME} PROPERTIES COMPILE_FLAGS "${TORQUE_CXX_FLAGS}")
|
||||
if (TORQUE_DYNAMIC_LIBRARY AND NOT TORQUE_TESTING)
|
||||
set_target_properties(TorqueEngine PROPERTIES COMPILE_FLAGS "${TORQUE_CXX_FLAGS_COMMON_DEFAULT}")
|
||||
endif (TORQUE_DYNAMIC_LIBRARY AND NOT TORQUE_TESTING)
|
||||
else()
|
||||
add_executable(${TORQUE_APP_NAME} ${TORQUE_SOURCE_FILES})
|
||||
|
||||
|
|
@ -387,6 +390,10 @@ if(MSVC)
|
|||
list(GET OUTPUT_CONFIG ${INDEX} CONF)
|
||||
list(GET OUTPUT_SUFFIX ${INDEX} SUFFIX)
|
||||
set_property(TARGET ${TORQUE_APP_NAME} PROPERTY OUTPUT_NAME_${CONF} ${TORQUE_APP_NAME}_${SUFFIX})
|
||||
if (TORQUE_DYNAMIC_LIBRARY AND NOT TORQUE_TESTING)
|
||||
set_property(TARGET TorqueEngine PROPERTY ${CONF}_POSTFIX "_${SUFFIX}")
|
||||
set_property(TARGET TorqueEngine PROPERTY ${CONF}_OUTPUT_NAME ${TORQUE_APP_NAME})
|
||||
endif (TORQUE_DYNAMIC_LIBRARY AND NOT TORQUE_TESTING)
|
||||
endforeach()
|
||||
# Set Visual Studio startup project
|
||||
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${TORQUE_APP_NAME})
|
||||
|
|
|
|||
|
|
@ -292,6 +292,8 @@ void StandardMainLoop::init()
|
|||
|
||||
Con::setVariable( "defaultGame", StringTable->insert("scripts") );
|
||||
|
||||
Con::setVariable("TorqueScriptFileExtension", TORQUE_SCRIPT_EXTENSION);
|
||||
|
||||
Con::addVariable( "_forceAllMainThread", TypeBool, &ThreadPool::getForceAllMainThread(), "Force all work items to execute on main thread. turns this into a single-threaded system. Primarily useful to find whether malfunctions are caused by parallel execution or not.\n"
|
||||
"@ingroup platform" );
|
||||
|
||||
|
|
@ -567,7 +569,6 @@ bool StandardMainLoop::handleCommandLine( S32 argc, const char **argv )
|
|||
Platform::setMainDotCsDir(buffer);
|
||||
Platform::setCurrentDirectory(buffer);
|
||||
|
||||
Con::setVariable("TorqueScriptFileExtension", TORQUE_SCRIPT_EXTENSION);
|
||||
Con::evaluate(script, false, useDefaultScript ? defaultScriptName : argv[1]);
|
||||
delete[] script;
|
||||
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ S32 TorqueMain(int argc, const char **argv)
|
|||
|
||||
extern "C" {
|
||||
|
||||
S32 torque_winmain( HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, S32)
|
||||
TORQUE_API S32 torque_winmain( HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, S32)
|
||||
{
|
||||
Vector<char *> argv( __FILE__, __LINE__ );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue