mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Merge pull request #680 from rextimmy/cmake_work
make use of folder properties in cmake
This commit is contained in:
commit
ae02725e96
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required (VERSION 3.10.2)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS TRUE)
|
||||
set(TORQUE_LIBS_FOLDER_NAME "Libs" CACHE STRING "The solution folder name to place all libs under")
|
||||
set(TORQUE_APP_NAME "" CACHE STRING "the app name")
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/temp" CACHE PATH "default install path" FORCE )
|
||||
|
|
|
|||
|
|
@ -340,6 +340,9 @@ macro(finishLibrary)
|
|||
#endforeach()
|
||||
|
||||
_postTargetProcess()
|
||||
|
||||
#set the folder property name
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER ${TORQUE_LIBS_FOLDER_NAME})
|
||||
endmacro()
|
||||
|
||||
# macro to add an executable
|
||||
|
|
|
|||
|
|
@ -969,3 +969,20 @@ if(TORQUE_TEMPLATE)
|
|||
INSTALL(FILES "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/DeletePrefs.bat" DESTINATION "${TORQUE_APP_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Properties folder
|
||||
###############################################################################
|
||||
# we only need to add libs that we add via add_subdirectory command, basics.cmake
|
||||
# will take care of the other source libs added via addLib
|
||||
|
||||
if(TORQUE_SFX_OPENAL AND WIN32)
|
||||
set_target_properties(OpenAL PROPERTIES FOLDER ${TORQUE_LIBS_FOLDER_NAME})
|
||||
#why is openal adding these two?
|
||||
set_target_properties(common PROPERTIES FOLDER ${TORQUE_LIBS_FOLDER_NAME})
|
||||
set_target_properties(ex-common PROPERTIES FOLDER ${TORQUE_LIBS_FOLDER_NAME})
|
||||
endif()
|
||||
|
||||
if(TORQUE_SDL)
|
||||
set_target_properties(SDL2 PROPERTIES FOLDER ${TORQUE_LIBS_FOLDER_NAME})
|
||||
endif()
|
||||
Loading…
Reference in a new issue