mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 17:19:39 +00:00
cmake option to use system tinyxml instead of embedded one
This commit is contained in:
parent
07ff0a8de9
commit
6f64b1b9db
2 changed files with 26 additions and 2 deletions
|
@ -161,6 +161,19 @@ if (NOT FFMPEG_FOUND)
|
||||||
message(WARNING "--------------------")
|
message(WARNING "--------------------")
|
||||||
endif (NOT FFMPEG_FOUND)
|
endif (NOT FFMPEG_FOUND)
|
||||||
|
|
||||||
|
# TinyXML
|
||||||
|
option(USE_SYSTEM_TINYXML "Use system TinyXML library instead of internal." OFF)
|
||||||
|
if(USE_SYSTEM_TINYXML)
|
||||||
|
find_library(TINYXML_LIBRARIES tinyxml)
|
||||||
|
find_path(TINYXML_INCLUDE_DIR tinyxml.h)
|
||||||
|
message(STATUS "Found TinyXML: ${TINYXML_LIBRARIES} ${TINYXML_INCLUDE_DIR}")
|
||||||
|
if(TINYXML_LIBRARIES AND TINYXML_INCLUDE_DIR)
|
||||||
|
include_directories(${TINYXML_INCLUDE_DIR})
|
||||||
|
message(STATUS "Using system TinyXML library.")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Detection of system TinyXML incomplete.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Platform specific
|
# Platform specific
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
|
15
extern/oics/CMakeLists.txt
vendored
15
extern/oics/CMakeLists.txt
vendored
|
@ -9,12 +9,23 @@ set(OICS_SOURCE_FILES
|
||||||
ICSInputControlSystem_keyboard.cpp
|
ICSInputControlSystem_keyboard.cpp
|
||||||
ICSInputControlSystem_mouse.cpp
|
ICSInputControlSystem_mouse.cpp
|
||||||
ICSInputControlSystem_joystick.cpp
|
ICSInputControlSystem_joystick.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(TINYXML_SOURCE_FILES
|
||||||
tinyxml.cpp
|
tinyxml.cpp
|
||||||
tinyxmlparser.cpp
|
tinyxmlparser.cpp
|
||||||
tinyxmlerror.cpp
|
tinyxmlerror.cpp
|
||||||
tinystr.cpp
|
tinystr.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(${OICS_LIBRARY} STATIC ${OICS_SOURCE_FILES})
|
if(USE_SYSTEM_TINYXML)
|
||||||
|
add_library(${OICS_LIBRARY} STATIC ${OICS_SOURCE_FILES})
|
||||||
|
target_link_libraries(${OICS_LIBRARY} ${TINYXML_LIBRARIES})
|
||||||
|
else()
|
||||||
|
add_library(${OICS_LIBRARY} STATIC
|
||||||
|
${OICS_SOURCE_FILES}
|
||||||
|
${TINYXML_SOURCE_FILES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Does this do anything?
|
||||||
link_directories(${CMAKE_CURRENT_BINARY_DIR})
|
link_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
Loading…
Reference in a new issue