mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
library containment:
after execution of found cmakelists.txt files, searh the engine/lib and apname/data directories recursively for a *torque_postbuild.cmake file, including the contents, to ensure any values used, such as TORQUE_LINK_LIBRARIES remain in parent scope
This commit is contained in:
parent
3ef60ffcb6
commit
9f01515e78
9 changed files with 69 additions and 47 deletions
43
Engine/lib/Torque_postBuild.cmake
Normal file
43
Engine/lib/Torque_postBuild.cmake
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
################# Set Engine Linkages ###################
|
||||
|
||||
# When on Windows, we need to link against winsock and windows codecs
|
||||
if (WIN32)
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} WS2_32.LIB windowscodecs.lib)
|
||||
if (TORQUE_D3D11)
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} dxguid.lib)
|
||||
endif (TORQUE_D3D11)
|
||||
endif (WIN32)
|
||||
|
||||
# Only link Apple frameworks when on an Apple platform
|
||||
if (APPLE)
|
||||
addFramework("Cocoa")
|
||||
addFramework("AppKit")
|
||||
addFramework("CoreData")
|
||||
addFramework("Foundation")
|
||||
#These are needed by sdl2 static lib
|
||||
addFramework("ForceFeedback")
|
||||
addFramework("IOKit")
|
||||
#grrr damn you sdl!
|
||||
addFramework("Carbon")
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} iconv)
|
||||
if(NOT TORQUE_DEDICATED)
|
||||
addFramework("OpenGL")
|
||||
addFramework("CoreVideo")
|
||||
if(TORQUE_SFX_OPENAL)
|
||||
addFramework("OpenAL")
|
||||
addFramework("CoreAudio")
|
||||
addFramework("AudioUnit")
|
||||
addFramework("AudioToolbox")
|
||||
endif(TORQUE_SFX_OPENAL)
|
||||
endif()
|
||||
endif (APPLE)
|
||||
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} nativeFileDialogs)
|
||||
|
||||
# Linux requires X11 & freetype
|
||||
if (UNIX AND NOT APPLE)
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} "X11" "Xft" "dl" "pthread")
|
||||
find_package(Freetype REQUIRED)
|
||||
set(TORQUE_INCLUDE_DIRECTORIES ${TORQUE_INCLUDE_DIRECTORIES} ${FREETYPE_INCLUDE_DIRS})
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} ${FREETYPE_LIBRARIES})
|
||||
endif (UNIX AND NOT APPLE)
|
||||
|
|
@ -6,6 +6,4 @@
|
|||
add_library(libogg ${LIBOGG_FILES})
|
||||
set_target_properties(libogg PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_include_directories(libogg PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
set(TORQUE_INCLUDE_DIRECTORIES ${TORQUE_INCLUDE_DIRECTORIES} "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
#set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} libogg)
|
||||
#endif()
|
||||
1
Engine/lib/libogg/Torque_postBuild.cmake
Normal file
1
Engine/lib/libogg/Torque_postBuild.cmake
Normal file
|
|
@ -0,0 +1 @@
|
|||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} libogg)
|
||||
|
|
@ -19,5 +19,5 @@
|
|||
target_link_libraries(libtheora PUBLIC libogg)
|
||||
target_compile_definitions(libtheora PUBLIC ${LIBTHEORA_COMPILE_DEFINES})
|
||||
set(TORQUE_INCLUDE_DIRECTORIES ${TORQUE_INCLUDE_DIRECTORIES} "${CMAKE_CURRENT_SOURCE_DIR}/include/theora")
|
||||
#set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} libtheora)
|
||||
#set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} libtheora PARENT_SCOPE)
|
||||
#endif()
|
||||
1
Engine/lib/libtheora/Torque_postBuild.cmake
Normal file
1
Engine/lib/libtheora/Torque_postBuild.cmake
Normal file
|
|
@ -0,0 +1 @@
|
|||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} libtheora)
|
||||
|
|
@ -13,5 +13,5 @@
|
|||
endif (UNIX)
|
||||
|
||||
set(TORQUE_INCLUDE_DIRECTORIES ${TORQUE_INCLUDE_DIRECTORIES} "${CMAKE_CURRENT_SOURCE_DIR}/include/vorbis")
|
||||
#set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} libvorbis)
|
||||
#set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} libvorbis PARENT_SCOPE)
|
||||
#endif()
|
||||
1
Engine/lib/libvorbis/Torque_postBuild.cmake
Normal file
1
Engine/lib/libvorbis/Torque_postBuild.cmake
Normal file
|
|
@ -0,0 +1 @@
|
|||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} libvorbis)
|
||||
1
Engine/lib/nativeFileDialogs/Torque_postBuild.cmake
Normal file
1
Engine/lib/nativeFileDialogs/Torque_postBuild.cmake
Normal file
|
|
@ -0,0 +1 @@
|
|||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} nativeFileDialogs)
|
||||
Loading…
Add table
Add a link
Reference in a new issue