Skip to content

Commit

Permalink
Cleanup CMakeLists.txt
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Sep 24, 2023
1 parent 835eec8 commit 78ee6c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/version.cpp ${CMAKE_CURRENT

# ---- Target kernel -----------------------------------------------------------

add_library(kernel SHARED "")
add_library(kernel SHARED)

add_library(${PROJECT_NAME}::kernel ALIAS kernel)

file(GLOB_RECURSE ${PROJECT_NAME}_KERNEL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*/*.cpp)

target_sources(kernel PRIVATE ${${PROJECT_NAME}_KERNEL_SOURCES}
PRIVATE ${${PROJECT_NAME}_OBJECTS})
target_sources(kernel PRIVATE ${${PROJECT_NAME}_KERNEL_SOURCES})

target_include_directories(kernel PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand All @@ -98,7 +97,9 @@ set_target_properties(kernel PROPERTIES OUTPUT_NAME ${PROJECT_NAME} # Rename lib

# ---- Target shell ------------------------------------------------------------

add_executable(shell ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp)
add_executable(shell)

target_sources(shell PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp)

target_link_libraries(shell PRIVATE kernel)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Subset of R7RS-small.
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make package
sudo apt install build/meevax_0.4.812_amd64.deb
sudo apt install build/meevax_0.4.813_amd64.deb
```

or
Expand Down Expand Up @@ -106,9 +106,9 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.4.812.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.4.813.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.4.812_amd64.deb`
| `package` | Generate debian package `meevax_0.4.813_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.812
0.4.813

0 comments on commit 78ee6c4

Please sign in to comment.