Jackalope / jrf (public) (License: GPLv3 or later version) (since 2019-11-21) (hash sha1)
Libriary for reading and writing resource files: vertices, indices, meshes, images, models and scene data.
Supports reading from filesystem as well as from zip files.
It uses unique binary container format for those resources.
It is used in tool for converting popular formats like wavefront .obj file, TARGA image to this container and also used in resource loader as part of graphics framework.

It requires jlib libriary (see my user repositories) and libzip.
It is possible to remove libzip dependency.
List of commits:
Subject Hash Author Date (UTC)
CMake compilation flags improvements. bba8a163c02c0ca916a53d7a1407619af3af2e39 Jackalope 2020-06-05 07:51:09
Version 0.3.0 95dff051377ef783b45f14da380fd91a5f52bb90 Jackalope 2020-06-03 21:36:05
Disable including zip.h when JRF_ZIP is set to OFF. 1d08eeac2e17869048343374824b2a20b989c06d Jackalope 2020-06-04 22:17:26
jrf-tool - executable tool for writing resources to jrf format. 02445928c639b84594802362b00954756c7cb4d2 Jackalope 2020-06-03 21:35:29
VertexAttribute to string 57fbaedce57e67d38b4d82969b93c3a97b20b2b7 Jackalope 2020-06-04 18:13:19
ResourceHandle instead of ResourceUnion. e38ee04ee3b9d07118a9ce687d872bbe3ee9bcca Jackalope 2020-06-03 21:33:34
Convert array of images to image array. 3a46e488e402842fa713d4689ede7c948779c58d Jackalope 2020-06-03 01:47:05
Wavefront obj file converter. aa9023cf916fb5af85bc181a04c3e9252f97c098 Jackalope 2020-06-03 01:45:56
Forget to add config to installation! 9eb91f41049b2f0dcda1442c1750da4266e97376 Jackalope 2020-06-01 16:26:51
Better config, solving some issues with linking to jrf. 11ab2d21090cf684c08954ffabea0fe317afcc0a Jackalope 2020-06-01 16:24:51
Link jrf-shared to jlib-shared and jrf-static to jrf-static. b965856e0f894aa48555b9ccfef812bd15d2e3a6 Jackalope 2020-06-01 16:23:26
Version 0.2.2 d6aaf170a2db27ddcd429a89fd873341ea8a0082 Jackalope 2020-05-31 23:47:23
Move definitions to configuration file. a7b28738de65520eddd08cbd5d8c958fa16eedbe Jackalope 2020-05-31 21:45:28
CMake: build both shared and static with JRF_SHARED and JRF_STATIC options. When is subdirectory, select only one instead. 0dc49150959af90cd9210367a61113eca85650eb Jackalope 2020-05-31 21:38:50
CMake: version check changed. 500bcbe11c7f1e418e5d8116e89654d160c8dbd6 Jackalope 2020-05-31 21:37:47
Reduced warnings. 865f2c52ed60c37c050a1033905bb2df278032a0 Jackalope 2020-05-27 15:03:07
Make "find_package(jlib 0.2.0 REQUIRED)" optional 58bfc04890fab24adf5fc84963cb1a3bca7a8706 Jackalope 2020-05-24 16:39:14
changed notice about native compilation 0ed7e9e5e72a2d13e8add619f7999a51634f8e9c Jackalope 2020-05-24 16:37:54
Version 0.2.1 02d30aa69e9026a3f96d8549a297fccfbefbda47 Jackalope 2020-05-24 14:31:31
Why there is Doxyfile? 16cf9fe9e64353a2a717668cc4083465e2f8dff5 Jackalope 2020-05-24 14:25:20
Commit bba8a163c02c0ca916a53d7a1407619af3af2e39 - CMake compilation flags improvements.
Author: Jackalope
Author date (UTC): 2020-06-05 07:51
Committer name: Jackalope
Committer date (UTC): 2020-06-05 07:51
Parent(s): 95dff051377ef783b45f14da380fd91a5f52bb90
Signing key:
Tree: 2f1414aac120e28b6c6a9c1b050f0395c716bee4
File Lines added Lines deleted
CMakeLists.txt 61 84
File CMakeLists.txt changed (mode: 100644) (index 1993ea3..d2bfaae)
... ... if(JRF_STATIC)
106 106 endif() endif()
107 107
108 108
109 option(JRF_NATIVE "Enable non-portable compiling optimizations" ON)
110 if (JRF_NATIVE)
111 message(NOTICE "JRF_NATIVE is enabled, compiling for native arch.")
112 endif()
109 #
110 # COMPILE_OPTIONS
111 #
112 if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
113 AND
114 NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
115 message("JRF: Unknown compiler ${CMAKE_CXX_COMPILER_ID}\
116 , cannot specify compilation flags")
117 else()
113 118
114 option(JRF_FORCE_OPTIMIZATIONS
115 "Enen \"-O3\" even when CMAKE_BUILD_TYPE=\"Debug\"" ON
116 )
117 if (NOT JRF_FORCE_OPTIMIZATIONS)
118 message(
119 "JRF: WARNING!!"
120 "Wavefront .obj file importing without optimizations will be very slow."
119 option(JRF_FORCE_OPTIMIZATIONS
120 "Enen \"-O3\" even when CMAKE_BUILD_TYPE=\"Debug\"" ON
121 121 ) )
122 endif()
123
124 set(EXPORT_NAME jrf-${PROJECT_VERSION})
122 if (NOT JRF_FORCE_OPTIMIZATIONS)
123 message(
124 "JRF: WARNING!!"
125 "Wavefront .obj file importing without optimizations will be very slow."
126 )
127 endif()
125 128
126 foreach(TARGET ${TARGETS})
127 target_include_directories(jrf-${TARGET} PUBLIC
128 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
129 $<INSTALL_INTERFACE:include/${EXPORT_NAME}>
129 list(APPEND COMPILE_OPTIONS
130 $<$<CONFIG:DEBUG>:-g3;-ggdb>
131 $<$<CONFIG:RELWITHDEBINFO>:-g3;-ggdb>
130 132 ) )
131 target_link_libraries(jrf-${TARGET} PUBLIC jlib-${TARGET} ${ZIP_LIB})
132 set_target_properties(jrf-${TARGET} PROPERTIES OUTPUT_NAME jrf)
133
134 133 if (JRF_FORCE_OPTIMIZATIONS) if (JRF_FORCE_OPTIMIZATIONS)
135 target_compile_options(jrf-${TARGET} PRIVATE -O3
136 $<$<CONFIG:DEBUG>:-g3;-ggdb>
137 $<$<CONFIG:RELWITHDEBINFO>:-g3;-ggdb>
134 list(APPEND COMPILE_OPTIONS
135 -O3
138 136 ) )
139 137 else() else()
140 target_compile_options(jrf-${TARGET} PRIVATE
141 $<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>
138 list(APPEND COMPILE_OPTIONS
139 $<$<CONFIG:DEBUG>:-O0>
142 140 $<$<CONFIG:RELEASE>:-O3> $<$<CONFIG:RELEASE>:-O3>
143 $<$<CONFIG:RELWITHDEBINFO>:-O3;-g3;-ggdb>
141 $<$<CONFIG:RELWITHDEBINFO>:-O3>
144 142 ) )
145 143 endif() endif()
146 target_compile_features(jrf-${TARGET} PUBLIC cxx_std_17)
144 # warnings
147 145 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
148 target_compile_options(jrf-${TARGET} PRIVATE
146 list(APPEND COMPILE_OPTIONS
149 147 -Weverything -Weverything
150 148 -Wno-c++98-compat-pedantic -Wno-c++98-compat-pedantic
151 149 -Wno-c++11-compat-pedantic -Wno-c++11-compat-pedantic
 
... ... foreach(TARGET ${TARGETS})
156 154 ) )
157 155 endif() endif()
158 156 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
159 target_compile_options(jrf-${TARGET} PRIVATE -Wall -Wextra)
157 list(APPEND COMPILE_OPTIONS -Wall -Wextra)
160 158 endif() endif()
159
160 option(JRF_NATIVE "Enable non-portable compiling optimizations" ON)
161 161 if (JRF_NATIVE) if (JRF_NATIVE)
162 target_compile_options(jrf-${TARGET} PRIVATE -march=native)
163 endif()
164 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
165 OR
166 CMAKE_CXX_COMPILER_ID STREQUAL "GCC")
167 target_compile_options(jrf-${TARGET}
168 PRIVATE -fno-exceptions -fno-rtti -ffast-math
162 message(STATUS
163 "JRF_NATIVE=ON - jrf will be compiled with optimizations for current CPU"
169 164 ) )
165 list(APPEND COMPILE_OPTIONS -march=native)
170 166 endif() endif()
171 167
168 # disable exceptions, rtti, slow legacy C-math
169 list(APPEND COMPILE_OPTIONS -fno-exceptions -fno-rtti -ffast-math)
170 endif()
171 #
172 # end COMPILE_OPTIONS
173 #
174
175 set(EXPORT_NAME jrf-${PROJECT_VERSION})
176
177 foreach(TARGET ${TARGETS})
178 target_include_directories(jrf-${TARGET} PUBLIC
179 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
180 $<INSTALL_INTERFACE:include/${EXPORT_NAME}>
181 )
182 target_link_libraries(jrf-${TARGET} PUBLIC jlib-${TARGET} ${ZIP_LIB})
183 set_target_properties(jrf-${TARGET} PROPERTIES OUTPUT_NAME jrf)
184
185 target_compile_features(jrf-${TARGET} PUBLIC cxx_std_17)
186 target_compile_options(jrf-${TARGET} PRIVATE ${COMPILE_OPTIONS})
187
172 188 if (IS_TOP_LEVEL) if (IS_TOP_LEVEL)
173 189 install(TARGETS jrf-${TARGET} install(TARGETS jrf-${TARGET}
174 190 DESTINATION lib DESTINATION lib
 
... ... option(JRF_TOOL "Enable jrftool" ON)
233 249 if (JRF_TOOL) if (JRF_TOOL)
234 250 add_executable(jrftool src/tool.cpp) add_executable(jrftool src/tool.cpp)
235 251
236 option(JRF_TOOL_FORCE_OPTIMIZATIONS
237 "Enen \"-O3\" even when CMAKE_BUILD_TYPE=\"Debug\"" OFF
238 )
239 if (JRF_TOOL_FORCE_OPTIMIZATIONS)
240 target_compile_options(jrftool PRIVATE -O3
241 $<$<CONFIG:DEBUG>:-g3;-ggdb>
242 $<$<CONFIG:RELWITHDEBINFO>:-g3;-ggdb>
243 )
244 else()
245 target_compile_options(jrftool PRIVATE
246 $<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>
247 $<$<CONFIG:RELEASE>:-O3>
248 $<$<CONFIG:RELWITHDEBINFO>:-O3;-g3;-ggdb>
249 )
250 endif()
251
252 252 if (JRF_SHARED) if (JRF_SHARED)
253 target_link_libraries(jrftool PRIVATE jrf-shared jlib-shared)
253 target_link_libraries(jrftool jrf-shared jlib-shared)
254 254 elseif(JRF_STATIC) elseif(JRF_STATIC)
255 target_link_libraries(jrftool PRIVATE jrf-static jlib-static)
255 target_link_libraries(jrftool jrf-static jlib-static)
256 256 endif() endif()
257 257
258 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
259 target_compile_options(jrftool PRIVATE
260 -Weverything
261 -Wno-c++98-compat-pedantic
262 -Wno-c++11-compat-pedantic
263 -Wno-c++14-compat-pedantic
264 -Wno-binary-literal
265 -Wno-padded
266 -Wno-switch-enum
267 )
268 endif()
269 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
270 target_compile_options(jrftool PRIVATE -Wall -Wextra)
271 endif()
272
273 if (JRT_NATIVE)
274 target_compile_options(jrftool PRIVATE -march=native)
275 endif()
276
277 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
278 OR
279 CMAKE_CXX_COMPILER_ID STREQUAL "GCC")
280 target_compile_options(jrftool PRIVATE -fno-exceptions -fno-rtti -ffast-math)
281 elseif()
282 message(FATAL_ERROR "Unrecognized compiler")
283 endif()
258 target_compile_features(jrftool PRIVATE cxx_std_17)
259 target_compile_options(jrftool PRIVATE ${COMPILE_OPTIONS})
284 260
285 261 option(JRF_TOOL_LTO "Enable LTO" ON) option(JRF_TOOL_LTO "Enable LTO" ON)
286 if (JRF_TOOL_LTO AND CMAKE_BUILD_TYPE STREQUAL Release)
262 if (JRF_TOOL_LTO)
263 message(STATUS
264 "JRF_TOOL_LTO=ON - build jrftool with link-time optimization"
265 )
287 266 set_property(TARGET jrftool APPEND_STRING PROPERTY LINK_FLAGS -flto) set_property(TARGET jrftool APPEND_STRING PROPERTY LINK_FLAGS -flto)
288 267 target_compile_options(jrftool PRIVATE -flto) target_compile_options(jrftool PRIVATE -flto)
289 message(STATUS "LTO is enabled")
290 268 endif() endif()
291 269
292 270 set_target_properties(jrftool PROPERTIES SUFFIX "-${PROJECT_VERSION}") set_target_properties(jrftool PROPERTIES SUFFIX "-${PROJECT_VERSION}")
293 set(EXPORT_NAME jrftool-${PROJECT_VERSION})
294 271 install(TARGETS jrftool EXPORT jrf-config) install(TARGETS jrftool EXPORT jrf-config)
295 272 endif() endif()
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/Jackalope/jrf

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/Jackalope/jrf

Clone this repository using git:
git clone git://git.rocketgit.com/user/Jackalope/jrf

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main