mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Do not require ICU on MinGW and MSVC targets.
This commit is contained in:
@@ -58,9 +58,6 @@ if (NOT DISABLE_TTF)
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# For unicode code page conversion.
|
|
||||||
find_package(ICU 59.0 REQUIRED COMPONENTS uc)
|
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
file(GLOB_RECURSE OPENRCT2_CORE_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.cpp"
|
file(GLOB_RECURSE OPENRCT2_CORE_SOURCES "${CMAKE_CURRENT_LIST_DIR}/*.cpp"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/*.h"
|
"${CMAKE_CURRENT_LIST_DIR}/*.h"
|
||||||
@@ -81,14 +78,12 @@ if (STATIC)
|
|||||||
target_link_libraries(${PROJECT} ${JANSSON_STATIC_LIBRARIES}
|
target_link_libraries(${PROJECT} ${JANSSON_STATIC_LIBRARIES}
|
||||||
${PNG_STATIC_LIBRARIES}
|
${PNG_STATIC_LIBRARIES}
|
||||||
${ZLIB_STATIC_LIBRARIES}
|
${ZLIB_STATIC_LIBRARIES}
|
||||||
${LIBZIP_STATIC_LIBRARIES}
|
${LIBZIP_STATIC_LIBRARIES})
|
||||||
${ICU_STATIC_LIBRARIES})
|
|
||||||
else ()
|
else ()
|
||||||
target_link_libraries(${PROJECT} ${JANSSON_LIBRARIES}
|
target_link_libraries(${PROJECT} ${JANSSON_LIBRARIES}
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${LIBZIP_LIBRARIES}
|
${LIBZIP_LIBRARIES})
|
||||||
${ICU_LIBRARIES})
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (UNIX AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
if (UNIX AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
||||||
@@ -115,6 +110,16 @@ if (NOT DISABLE_NETWORK)
|
|||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (NOT MINGW AND NOT MSVC)
|
||||||
|
# For unicode code page conversion.
|
||||||
|
find_package(ICU 59.0 REQUIRED COMPONENTS uc)
|
||||||
|
if (STATIC)
|
||||||
|
target_link_libraries(${PROJECT} ${ICU_STATIC_LIBRARIES})
|
||||||
|
else ()
|
||||||
|
target_link_libraries(${PROJECT} ${ICU_LIBRARIES})
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (NOT APPLE AND NOT MINGW AND NOT MSVC)
|
if (NOT APPLE AND NOT MINGW AND NOT MSVC)
|
||||||
# This is ugly hack to work around https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899.
|
# This is ugly hack to work around https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899.
|
||||||
# Once C++17 is enabled (and thus old compilers are no longer supported, this needs to be gone.
|
# Once C++17 is enabled (and thus old compilers are no longer supported, this needs to be gone.
|
||||||
|
|||||||
@@ -91,9 +91,11 @@ add_library(test-common STATIC ${COMMON_TEST_SOURCES})
|
|||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_LIST_DIR}/testdata" "${CMAKE_CURRENT_BINARY_DIR}/testdata")
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_LIST_DIR}/testdata" "${CMAKE_CURRENT_BINARY_DIR}/testdata")
|
||||||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/openrct2\" \"${CMAKE_CURRENT_BINARY_DIR}/data\")")
|
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/openrct2\" \"${CMAKE_CURRENT_BINARY_DIR}/data\")")
|
||||||
|
|
||||||
# For unicode code page conversion (required for ini and string tests)
|
if (NOT MINGW AND NOT MSVC)
|
||||||
find_package(ICU 59.0 REQUIRED COMPONENTS uc)
|
# For unicode code page conversion (required for ini and string tests)
|
||||||
target_link_libraries(test-common ${ICU_LIBRARIES})
|
find_package(ICU 59.0 REQUIRED COMPONENTS uc)
|
||||||
|
target_link_libraries(test-common ${ICU_LIBRARIES})
|
||||||
|
endif ()
|
||||||
|
|
||||||
# Start of our tests
|
# Start of our tests
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user