fix: Restore FindICU
fix: update CMakeLists to new format
This commit is contained in:
@@ -248,15 +248,15 @@ include_directories(${CMAKE_SOURCE_DIR}/src/3rdparty/squirrel/include)
|
||||
|
||||
include(MSVCFilters)
|
||||
|
||||
add_library(openttd_lib OBJECT ${GENERATED_SOURCE_FILES})
|
||||
if(ANDROID)
|
||||
add_library(openttd SHARED ${GENERATED_SOURCE_FILES})
|
||||
set(BINARY_NAME application)
|
||||
target_link_libraries(openttd log z)
|
||||
target_link_libraries(openttd_lib log z)
|
||||
add_library(openttd SHARED)
|
||||
else()
|
||||
add_library(openttd_lib OBJECT ${GENERATED_SOURCE_FILES})
|
||||
add_executable(openttd WIN32)
|
||||
add_executable(openttd_test)
|
||||
endif()
|
||||
add_executable(openttd_test)
|
||||
|
||||
set_target_properties(openttd PROPERTIES OUTPUT_NAME "${BINARY_NAME}")
|
||||
# All other files are added via target_sources()
|
||||
|
||||
@@ -42,12 +42,13 @@ foreach(MOD_NAME IN LISTS ICU_FIND_COMPONENTS)
|
||||
# Check the libraries returned by pkg-config really exist.
|
||||
unset(PC_LIBRARIES)
|
||||
foreach(LIBRARY IN LISTS PC_ICU_${MOD_NAME}_LIBRARIES)
|
||||
unset(PC_LIBRARY CACHE)
|
||||
find_library(PC_LIBRARY NAMES ${LIBRARY})
|
||||
if(NOT PC_LIBRARY)
|
||||
if(NOT PC_ICU_${MOD_NAME}_LIBRARY)
|
||||
find_library(PC_ICU_${MOD_NAME}_LIBRARY NAMES ${LIBRARY})
|
||||
endif()
|
||||
if(NOT PC_ICU_${MOD_NAME}_LIBRARY)
|
||||
unset(PC_ICU_${MOD_NAME}_FOUND)
|
||||
endif()
|
||||
list(APPEND PC_LIBRARIES ${PC_LIBRARY})
|
||||
list(APPEND PC_LIBRARIES ${PC_ICU_${MOD_NAME}_LIBRARY})
|
||||
endforeach()
|
||||
unset(PC_LIBRARY CACHE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user