Skip to content

Commit f8787a6

Browse files
committed
Install more stuff
1 parent c96b4eb commit f8787a6

File tree

6 files changed

+40
-10
lines changed

6 files changed

+40
-10
lines changed

.github/workflows/linux-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ jobs:
1818
with:
1919
imageName: ghcr.io/dragonruby/internal-lightstorm-ci
2020
runCmd: |
21-
cmake --preset lightstorm
22-
cmake --build ./build.debug.dir/build -t run-integration-tests
21+
cmake --preset lightstorm-ubuntu
22+
cmake --build --preset lightstorm-ubuntu-tests

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Output
22
build*dir
3+
install*dir
34
*.lit_test_times.txt

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.27)
2-
project(LightStorm)
2+
project(lightstorm)
33

44
set(CMAKE_CXX_STANDARD 20)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)

CMakePresets.json

+22-7
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,33 @@
22
"version": 8,
33
"configurePresets": [
44
{
5-
"name": "lightstorm",
6-
"displayName": "lightstorm",
7-
"description": "Sets Ninja generator, build and install directory",
5+
"name": "lightstorm-defaults",
86
"generator": "Ninja",
9-
"binaryDir": "${sourceDir}/build.debug.dir/build",
7+
"binaryDir": "${sourceDir}/build.dir",
8+
"installDir": "${sourceDir}/install.dir",
9+
"cacheVariables": {
10+
"CMAKE_BUILD_TYPE": "Release"
11+
}
12+
},
13+
{
14+
"name": "lightstorm-ubuntu",
15+
"inherits": "lightstorm-defaults",
1016
"cacheVariables": {
11-
"CMAKE_BUILD_TYPE": "Debug",
1217
"CMAKE_C_COMPILER": "clang-19",
1318
"CMAKE_CXX_COMPILER": "clang++-19",
14-
"CMAKE_PREFIX_PATH": "/usr/lib/llvm-19/lib/cmake",
15-
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build.debug.dir/install"
19+
"CMAKE_PREFIX_PATH": "/usr/lib/llvm-19/lib/cmake"
1620
}
1721
}
22+
],
23+
"buildPresets": [
24+
{
25+
"name": "lightstorm-ubuntu",
26+
"configurePreset": "lightstorm-ubuntu"
27+
},
28+
{
29+
"name": "lightstorm-ubuntu-tests",
30+
"inherits": "lightstorm-ubuntu",
31+
"targets": "run-integration-tests"
32+
}
1833
]
1934
}

cmake/mruby.cmake

+12
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,23 @@ ExternalProject_Add(
2020
add_executable(mruby_binary IMPORTED GLOBAL)
2121
set_property(TARGET mruby_binary PROPERTY IMPORTED_LOCATION ${MRUBY_BINARY})
2222
add_dependencies(mruby_binary mruby)
23+
install(
24+
FILES $<TARGET_FILE:mruby_binary>
25+
DESTINATION ${CMAKE_INSTALL_BINDIR}
26+
RENAME lightstorm-mruby)
2327

2428
add_executable(mrbc_binary IMPORTED GLOBAL)
2529
set_property(TARGET mrbc_binary PROPERTY IMPORTED_LOCATION ${MRBC_BINARY})
2630
add_dependencies(mrbc_binary mruby)
31+
install(
32+
FILES $<TARGET_FILE:mrbc_binary>
33+
DESTINATION ${CMAKE_INSTALL_BINDIR}
34+
RENAME lightstorm-mrbc)
2735

2836
add_library(mruby_static STATIC IMPORTED GLOBAL)
2937
set_property(TARGET mruby_static PROPERTY IMPORTED_LOCATION ${MRUBY_STATIC})
3038
add_dependencies(mruby_static mruby)
39+
install(
40+
FILES $<TARGET_FILE:mruby_static>
41+
DESTINATION ${CMAKE_INSTALL_LIBDIR}
42+
RENAME liblightstorm_mruby.a)

lib/runtime/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ target_compile_options(lightstorm_runtime_main PRIVATE ${LIGHTSTORM_CFLAGS})
88
target_link_options(lightstorm_runtime_main PRIVATE ${LIGHTSTORM_CFLAGS})
99
target_link_libraries(lightstorm_runtime_main PUBLIC m)
1010
add_dependencies(lightstorm_runtime_main mruby_static)
11+
install(TARGETS lightstorm_runtime_main)
12+
install(FILES lightstorm_runtime.c DESTINATION ${CMAKE_INSTALL_LIBDIR})

0 commit comments

Comments
 (0)