forked from mirror/openmw-tes3mp
Uses FindTinyXML to find package
This commit is contained in:
parent
4d0544e61a
commit
28c63aea72
3 changed files with 20 additions and 40 deletions
|
@ -156,16 +156,9 @@ add_definitions(-D__STDC_CONSTANT_MACROS)
|
|||
# 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}")
|
||||
find_package(TinyXML REQUIRED)
|
||||
add_definitions (-DTIXML_USE_STL)
|
||||
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()
|
||||
include_directories(SYSTEM ${TinyXML_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# Platform specific
|
||||
|
@ -676,8 +669,6 @@ if (WIN32)
|
|||
endforeach(d)
|
||||
|
||||
set_target_properties(components PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||
# oics uses tinyxml, which has an initialized but unused variable
|
||||
set_target_properties(oics PROPERTIES COMPILE_FLAGS "${WARNINGS} /wd4189 ${MT_BUILD}")
|
||||
set_target_properties(osg-ffmpeg-videoplayer PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||
|
||||
if (BUILD_BSATOOL)
|
||||
|
|
|
@ -165,7 +165,7 @@ if (ANDROID)
|
|||
endif (ANDROID)
|
||||
|
||||
if (USE_SYSTEM_TINYXML)
|
||||
target_link_libraries(openmw ${TINYXML_LIBRARIES})
|
||||
target_link_libraries(openmw ${TinyXML_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (NOT UNIX)
|
||||
|
|
23
extern/oics/CMakeLists.txt
vendored
23
extern/oics/CMakeLists.txt
vendored
|
@ -1,8 +1,4 @@
|
|||
set(OICS_LIBRARY "oics")
|
||||
|
||||
# Sources
|
||||
|
||||
set(OICS_SOURCE_FILES
|
||||
add_library(oics STATIC
|
||||
ICSChannel.cpp
|
||||
ICSControl.cpp
|
||||
ICSInputControlSystem.cpp
|
||||
|
@ -12,21 +8,14 @@ set(OICS_SOURCE_FILES
|
|||
ICSPrerequisites.h
|
||||
)
|
||||
|
||||
set(TINYXML_SOURCE_FILES
|
||||
if(USE_SYSTEM_TINYXML)
|
||||
target_link_libraries(oics ${TinyXML_LIBRARIES})
|
||||
else()
|
||||
add_library(local_tinyxml STATIC
|
||||
tinyxml.cpp
|
||||
tinyxmlparser.cpp
|
||||
tinyxmlerror.cpp
|
||||
tinystr.cpp
|
||||
)
|
||||
|
||||
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})
|
||||
target_link_libraries(oics local_tinyxml)
|
||||
endif()
|
||||
|
||||
# Does this do anything?
|
||||
link_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
|
Loading…
Reference in a new issue