diff --git a/CMakeLists.txt b/CMakeLists.txt index df8e7f4..02e262c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,7 +91,8 @@ else() endif() endif() -# RagePhoto C++ Standard +# RagePhoto C/C++ Standard +set(RAGEPHOTO_C_STANDARD "99" CACHE STRING "libragephoto C standard") set(RAGEPHOTO_CXX_STANDARD "11" CACHE STRING "libragephoto C++ standard") # RagePhoto Win32 Shared Resources @@ -120,6 +121,8 @@ else() ) endif() set_target_properties(ragephoto PROPERTIES + C_STANDARD ${RAGEPHOTO_C_STANDARD} + C_STANDARD_REQUIRED ON CXX_STANDARD ${RAGEPHOTO_CXX_STANDARD} CXX_STANDARD_REQUIRED ON ) @@ -136,7 +139,9 @@ target_include_directories(ragephoto PUBLIC "${ragephoto_BINARY_DIR}/include" "${ragephoto_SOURCE_DIR}/src/core" ) -target_link_libraries(ragephoto PRIVATE ${LIBRAGEPHOTO_LIBS}) +target_link_libraries(ragephoto PRIVATE + $<$:iconv> +) install(TARGETS ragephoto ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" diff --git a/cmake/unicode.cmake b/cmake/unicode.cmake index 079dd7f..5806a21 100644 --- a/cmake/unicode.cmake +++ b/cmake/unicode.cmake @@ -17,15 +17,11 @@ ****************************************************************************]] set(RAGEPHOTO_UNICODE "" CACHE STRING "libragephoto Unicode implementation") -set(RAGEPHOTO_UNICODE_LIBS "" CACHE STRING "libragephoto Unicode libraries") if (RAGEPHOTO_UNICODE) string(TOUPPER "UNICODE_${RAGEPHOTO_UNICODE}" UNICODE_DEF) list(APPEND LIBRAGEPHOTO_DEFINES ${UNICODE_DEF} ) - list(APPEND LIBRAGEPHOTO_LIBS - ${RAGEPHOTO_UNICODE_LIBS} - ) message("-- UnicodeCvt - ${RAGEPHOTO_UNICODE}") else() # RagePhoto test source files @@ -92,11 +88,6 @@ else() list(APPEND LIBRAGEPHOTO_DEFINES UNICODE_ICONV ) - if (ICONV_LINKED) - list(APPEND LIBRAGEPHOTO_LIBS - iconv - ) - endif() message("-- UnicodeCvt - iconv") else() message("-- UnicodeCvt - none") diff --git a/cmake/wasm.cmake b/cmake/wasm.cmake index a6d481a..ab321a8 100644 --- a/cmake/wasm.cmake +++ b/cmake/wasm.cmake @@ -1,6 +1,6 @@ #[[************************************************************************** * libragephoto RAGE Photo Parser -* Copyright (C) 2023-2024 Syping +* Copyright (C) 2023-2025 Syping * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -21,6 +21,8 @@ add_executable(ragephoto-wasm ${RAGEPHOTO_SOURCES} ) set_target_properties(ragephoto-wasm PROPERTIES + C_STANDARD ${RAGEPHOTO_C_STANDARD} + C_STANDARD_REQUIRED ON CXX_STANDARD ${RAGEPHOTO_CXX_STANDARD} CXX_STANDARD_REQUIRED ON PREFIX "lib" diff --git a/src/core/RagePhotoConfig.h.in b/src/core/RagePhotoConfig.h.in index ba83c38..5f3d4c1 100644 --- a/src/core/RagePhotoConfig.h.in +++ b/src/core/RagePhotoConfig.h.in @@ -1,6 +1,6 @@ /***************************************************************************** * libragephoto RAGE Photo Parser -* Copyright (C) 2023-2024 Syping +* Copyright (C) 2023-2025 Syping * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: