Skip to content

Commit

Permalink
Document that EasyRPG Player requires inih
Browse files Browse the repository at this point in the history
Exclude inih from CMake config file when disabled.
  • Loading branch information
Ghabry committed Jan 6, 2025
1 parent 39c1cc3 commit 8c4f207
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(MiscUtils)

# Compilation options
option(BUILD_SHARED_LIBS "Build shared library, disable for building the static library (default: ON)" ON)
option(LIBLCF_WITH_INIH "INI parsing support, (inih, default: ON)" ON)
option(LIBLCF_WITH_INIH "INI parsing support (inih, required when building EasyRPG Player, default: ON)" ON)
option(LIBLCF_WITH_ICU "ICU encoding handling (when disabled only windows-1252 is supported, default: ON)" ON)
option(LIBLCF_WITH_XML "XML reading support (expat, default: ON)" ON)
option(LIBLCF_UPDATE_MIMEDB "Whether to run update-mime-database after install (default: ON)" ON)
Expand Down Expand Up @@ -293,8 +293,6 @@ set(LCF_HEADERS
src/lcf/third_party/string_view.h
)



set(LCF_SUPPORT_INIH 0)
if(LIBLCF_WITH_INIH)
list(APPEND LCF_SOURCES
Expand Down Expand Up @@ -359,6 +357,8 @@ set_property(TARGET lcf PROPERTY EXPORT_NAME liblcf)
if (LCF_SUPPORT_INIH)
find_package(inih REQUIRED)
target_link_libraries(lcf inih::inih)
else()
message(STATUS "inih is disabled. This component is required when building EasyRPG Player.")
endif ()

# icu
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Documentation is available at the documentation wiki: https://wiki.easyrpg.org

## Requirements

- [inih] for INI file reading. (required)
- [inih] for INI file reading. (required when building EasyRPG Player)
- [Expat] for XML reading support.
- [ICU] for character encoding detection and conversion (recommended).
- [ICU] for character encoding detection and conversion (recommended). When disabled only Windows-1252 is supported.


## Source code
Expand Down
4 changes: 3 additions & 1 deletion builds/cmake/liblcf-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ include(CMakeFindDependencyMacro)
# Required to find our installed Findinih.cmake
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")

find_dependency(inih REQUIRED)
if(@LCF_SUPPORT_INIH@)
find_dependency(inih REQUIRED)
endif()

if(@LCF_SUPPORT_ICU@ EQUAL 1)
find_dependency(ICU COMPONENTS i18n uc data REQUIRED)
Expand Down

0 comments on commit 8c4f207

Please sign in to comment.