mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
* BugFix: Correct compilation for MacOS by explicitly specifying C++11 for all libraries and C++17 for the engine itself.
This commit is contained in:
parent
82b33b757a
commit
58f6431ff0
2 changed files with 6 additions and 3 deletions
|
|
@ -348,6 +348,8 @@ macro(finishLibrary)
|
||||||
add_library("${PROJECT_NAME}" SHARED ${${PROJECT_NAME}_files})
|
add_library("${PROJECT_NAME}" SHARED ${${PROJECT_NAME}_files})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
|
||||||
|
|
||||||
# omg - only use the first folder ... otherwise we get lots of header name collisions
|
# omg - only use the first folder ... otherwise we get lots of header name collisions
|
||||||
#foreach(dir ${${PROJECT_NAME}_paths})
|
#foreach(dir ${${PROJECT_NAME}_paths})
|
||||||
addInclude("${firstDir}")
|
addInclude("${firstDir}")
|
||||||
|
|
@ -384,6 +386,10 @@ macro(finishExecutable)
|
||||||
else()
|
else()
|
||||||
add_executable("${PROJECT_NAME}" WIN32 ${${PROJECT_NAME}_files})
|
add_executable("${PROJECT_NAME}" WIN32 ${${PROJECT_NAME}_files})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Torque requires c++17
|
||||||
|
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
|
||||||
|
|
||||||
addInclude("${firstDir}")
|
addInclude("${firstDir}")
|
||||||
|
|
||||||
_postTargetProcess()
|
_postTargetProcess()
|
||||||
|
|
|
||||||
|
|
@ -656,9 +656,6 @@ finishExecutable()
|
||||||
###############################################################################
|
###############################################################################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# Torque requires c++17
|
|
||||||
target_compile_features(${TORQUE_APP_NAME} PRIVATE cxx_std_17)
|
|
||||||
|
|
||||||
# Set Visual Studio startup project
|
# Set Visual Studio startup project
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${TORQUE_APP_NAME})
|
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${TORQUE_APP_NAME})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue