Skip to content

Commit c72cc88

Browse files
committed
feat: add install target with self-contained Linux layout
cmake --install now produces a flat directory that mirrors the Windows runtime/ layout: <prefix>/ PathOfBuilding # launcher libSimpleGraphic.so # engine socket.so, lcurl.so, lua-utf8.so, lzip.so # Lua C modules SimpleGraphic/ Fonts/ # pre-rendered bitmap fonts SimpleGraphic.cfg # default engine config Font bitmaps are added to data/SimpleGraphic/Fonts/ in this repository (they are engine assets previously bundled with PoB's runtime/). Two CMake fixes enable the flat layout: - Add LIBRARY DESTINATION "." to all SHARED target install rules so Linux .so files land in the prefix root instead of lib64/. - Install data/SimpleGraphic into the prefix alongside the binaries. The launcher now sets SG_BASE_PATH to its own directory, so fonts are found whether running from the build directory or an installed prefix.
1 parent 47d2e53 commit c72cc88

122 files changed

Lines changed: 14470 additions & 12 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ target_link_libraries(SimpleGraphic
256256
)
257257

258258
install(FILES $<TARGET_RUNTIME_DLLS:SimpleGraphic> DESTINATION ".")
259-
install(TARGETS SimpleGraphic RUNTIME DESTINATION ".")
259+
install(TARGETS SimpleGraphic RUNTIME DESTINATION "." LIBRARY DESTINATION ".")
260260

261261
if (WIN32)
262262
set(DEPS_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}")
@@ -314,7 +314,7 @@ target_link_libraries(lcurl
314314
LuaJIT::LuaJIT
315315
)
316316

317-
install(TARGETS lcurl RUNTIME DESTINATION ".")
317+
install(TARGETS lcurl RUNTIME DESTINATION "." LIBRARY DESTINATION ".")
318318
install(FILES $<TARGET_RUNTIME_DLLS:lcurl> DESTINATION ".")
319319

320320
# luautf8 module
@@ -345,7 +345,7 @@ target_link_libraries(lua-utf8
345345
LuaJIT::LuaJIT
346346
)
347347

348-
install(TARGETS lua-utf8 RUNTIME DESTINATION ".")
348+
install(TARGETS lua-utf8 RUNTIME DESTINATION "." LIBRARY DESTINATION ".")
349349
install(FILES $<TARGET_RUNTIME_DLLS:lua-utf8> DESTINATION ".")
350350

351351
# luasocket module
@@ -390,7 +390,7 @@ target_link_libraries(luasocket
390390
)
391391

392392
set_target_properties(luasocket PROPERTIES OUTPUT_NAME "socket" PREFIX "")
393-
install(TARGETS luasocket RUNTIME DESTINATION ".")
393+
install(TARGETS luasocket RUNTIME DESTINATION "." LIBRARY DESTINATION ".")
394394
install(FILES $<TARGET_RUNTIME_DLLS:luasocket> DESTINATION ".")
395395

396396
# lzip module
@@ -410,12 +410,13 @@ target_link_libraries(lzip
410410
ZLIB::ZLIB
411411
)
412412

413-
install(TARGETS lzip RUNTIME DESTINATION ".")
413+
install(TARGETS lzip RUNTIME DESTINATION "." LIBRARY DESTINATION ".")
414414
install(FILES $<TARGET_RUNTIME_DLLS:lzip> DESTINATION ".")
415415

416416
# Linux launcher
417417
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
418418
add_executable(PathOfBuilding linux/launcher.c)
419419
target_link_libraries(PathOfBuilding PRIVATE ${CMAKE_DL_LIBS})
420420
install(TARGETS PathOfBuilding RUNTIME DESTINATION ".")
421+
install(DIRECTORY data/SimpleGraphic DESTINATION ".")
421422
endif()
14.2 KB
Binary file not shown.
16 KB
Binary file not shown.
21.4 KB
Binary file not shown.
24.4 KB
Binary file not shown.
27.7 KB
Binary file not shown.
32.6 KB
Binary file not shown.
37.4 KB
Binary file not shown.
41.5 KB
Binary file not shown.
45.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)