From aae89c40e611032102e962a73499b6a4e467d9b3 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 5 Oct 2023 10:45:43 +0200 Subject: [PATCH] BUILD: Delete our own FindIconv.cmake --- CMakeLists.txt | 4 +-- cmake/FindIconv.cmake | 79 ------------------------------------------- rules.mk | 1 - 3 files changed, 2 insertions(+), 82 deletions(-) delete mode 100644 cmake/FindIconv.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ca0560b..79b4157b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -267,8 +267,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(PHAETHON_LIBRARIES "") find_package(Iconv REQUIRED) -include_directories(${ICONV_INCLUDE_DIRS}) -list(APPEND PHAETHON_LIBRARIES ${ICONV_LIBRARIES}) +include_directories(${Iconv_INCLUDE_DIRS}) +list(APPEND PHAETHON_LIBRARIES ${Iconv_LIBRARIES}) find_package(ZLIB REQUIRED) include_directories(${ZLIB_INCLUDE_DIRS}) diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake deleted file mode 100644 index 4df6c3b8..00000000 --- a/cmake/FindIconv.cmake +++ /dev/null @@ -1,79 +0,0 @@ -# Phaethon - A FLOSS resource explorer for BioWare's Aurora engine games -# -# Phaethon is the legal property of its developers, whose names -# can be found in the AUTHORS file distributed with this source -# distribution. -# -# Phaethon is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# Phaethon is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Phaethon. If not, see . - -# https://github.com/onyx-intl/cmake_modules/blob/master/FindIconv.cmake -# -# - Try to find Iconv -# Once done this will define -# -# ICONV_FOUND - system has Iconv -# ICONV_INCLUDE_DIR - the Iconv include directory -# ICONV_LIBRARIES - Link these to use Iconv -# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const -# -include(CheckCXXSourceCompiles) - -IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - # Already in cache, be silent - SET(ICONV_FIND_QUIETLY TRUE) -ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - -FIND_PATH(ICONV_INCLUDE_DIR iconv.h) - -FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) - -IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - SET(ICONV_FOUND TRUE) - SET(ICONV_INCLUDE_DIRS ${ICONV_INCLUDE_DIR}) -ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - -set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) -set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) -IF(ICONV_FOUND) - check_cxx_source_compiles(" - #include - int main(){ - iconv_t conv = 0; - const char* in = 0; - size_t ilen = 0; - char* out = 0; - size_t olen = 0; - iconv(conv, &in, &ilen, &out, &olen); - return 0; - } -" ICONV_SECOND_ARGUMENT_IS_CONST ) -ENDIF(ICONV_FOUND) -set(CMAKE_REQUIRED_INCLUDES) -set(CMAKE_REQUIRED_LIBRARIES) - -IF(ICONV_FOUND) - IF(NOT ICONV_FIND_QUIETLY) - MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") - ENDIF(NOT ICONV_FIND_QUIETLY) -ELSE(ICONV_FOUND) - IF(Iconv_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Iconv") - ENDIF(Iconv_FIND_REQUIRED) -ENDIF(ICONV_FOUND) - -MARK_AS_ADVANCED( - ICONV_INCLUDE_DIR - ICONV_LIBRARIES - ICONV_SECOND_ARGUMENT_IS_CONST -) diff --git a/rules.mk b/rules.mk index 6307e256..7796b96f 100644 --- a/rules.mk +++ b/rules.mk @@ -36,7 +36,6 @@ EXTRA_DIST += \ cmake/CMakeAM.cmake \ cmake/CMakeUninstall.cmake \ cmake/FindFaad.cmake \ - cmake/FindIconv.cmake \ cmake/FindLibLZMA.cmake \ cmake/FindMad.cmake \ cmake/FindOgg.cmake \