2017-11-13 20:54:47 -08:00
|
|
|
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
|
2018-12-30 21:01:42 -08:00
|
|
|
|
|
|
|
set(TINYXML_LIB_VERSION "5.0.1")
|
|
|
|
set(TINYXML_LIB_SOVERSION "5")
|
2021-04-06 12:02:50 -07:00
|
|
|
add_library(tinyxml2_static STATIC ../extern/tinyxml2/tinyxml2.cpp ../extern/tinyxml2/tinyxml2.h)
|
2018-12-30 21:01:42 -08:00
|
|
|
set_target_properties(tinyxml2_static PROPERTIES
|
|
|
|
COMPILE_DEFINITONS "TINYXML2_EXPORT"
|
|
|
|
VERSION "${TINYXML_LIB_VERSION}"
|
|
|
|
SOVERSION "${TINYXML_LIB_SOVERSION}")
|
2019-06-11 19:05:17 -07:00
|
|
|
set_target_properties(tinyxml2_static PROPERTIES OUTPUT_NAME tinyxml2)
|
2019-02-17 21:47:46 -08:00
|
|
|
if (NOT MSVC)
|
2019-06-11 19:05:17 -07:00
|
|
|
target_compile_options(tinyxml2_static PRIVATE -Wno-implicit-fallthrough)
|
2019-02-17 21:47:46 -08:00
|
|
|
endif()
|
2018-12-30 21:01:42 -08:00
|
|
|
|
2017-07-02 03:18:38 -07:00
|
|
|
add_executable(assetnameparser "main.cpp")
|
|
|
|
|
|
|
|
set(AN_PARSER_LIBS "")
|
|
|
|
if (UNIX)
|
2019-02-17 21:47:46 -08:00
|
|
|
list(APPEND AN_PARSER_LIBS pthread)
|
|
|
|
if(UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
list(APPEND AN_PARSER_LIBS dl)
|
|
|
|
endif()
|
2017-07-02 03:18:38 -07:00
|
|
|
endif()
|
|
|
|
|
2017-07-02 20:53:05 -07:00
|
|
|
target_link_libraries(assetnameparser tinyxml2_static logvisor ${AN_PARSER_LIBS})
|