Commit 6f4eda74 authored by Jon's avatar Jon

Simplify CMake mruby object library

Also removes an unnecessary build target from the CMake generated
build and project files.
parent c14e4408
...@@ -7,6 +7,5 @@ file(GLOB MRUBY_SRC_C "*.c") ...@@ -7,6 +7,5 @@ file(GLOB MRUBY_SRC_C "*.c")
list(APPEND MRUBY_SRC_C "${CMAKE_CURRENT_BINARY_DIR}/parse.c") list(APPEND MRUBY_SRC_C "${CMAKE_CURRENT_BINARY_DIR}/parse.c")
add_library(mruby_object OBJECT ${MRUBY_SRC_C} ${BISON_mruby_OUTPUTS}) add_library(mruby_object OBJECT ${MRUBY_SRC_C} ${BISON_mruby_OUTPUTS})
add_library(mruby_static STATIC EXCLUDE_FROM_ALL $<TARGET_OBJECTS:mruby_object>)
# vim: ts=2 sts=2 sw=2 et # vim: ts=2 sts=2 sw=2 et
# build tools/mrbc executable # build tools/mrbc executable
file(GLOB MRBC_SRC_C "*.c") file(GLOB MRBC_SRC_C "*.c")
add_executable(mrbc ${MRBC_SRC_C}) add_executable(mrbc ${MRBC_SRC_C} $<TARGET_OBJECTS:mruby_object>)
target_link_libraries(mrbc mruby_static ${MRUBY_LIBS}) target_link_libraries(mrbc ${MRUBY_LIBS})
install(TARGETS mrbc RUNTIME DESTINATION bin) install(TARGETS mrbc RUNTIME DESTINATION bin)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment