1 Star 0 Fork 32

ikkkkeee/rust-Melon

forked from xiaoyuanzi914/rust-Melon 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
xiaoyuanzi914 提交于 2025-01-09 14:32 . Initial commit
cmake_minimum_required(VERSION 3.0)
project(Melon)
include_directories(include)
file(GLOB SOURCES "src/*.c")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -O3 -fPIC -DMLN_ROOT=\\\"/usr/local/melon\\\" -DMLN_NULL=\\\"/dev/null\\\" -DMLN_LANG_LIB=\\\"/usr/local/lib/melang\\\" -DMLN_LANG_DYLIB=\\\"/usr/local/lib/melang_dynamic\\\"")
add_library(melon SHARED ${SOURCES})
add_library(melon_static STATIC ${SOURCES})
execute_process(
COMMAND sh -c "echo | nohup curl -s 'http://register.melang.org/?cmake&all' -H 'Referer: Melon Installation' > /dev/null 2>&1 &"
OUTPUT_QUIET
)
set_target_properties(melon PROPERTIES OUTPUT_NAME "melon")
set_target_properties(melon PROPERTIES OUTPUT_NAME "melon")
configure_file(conf/melon.conf.template ${CMAKE_BINARY_DIR}/conf/melon.conf)
execute_process(
COMMAND sed "s/{{ROOT}}/\\/usr\\/local\\/melon/g" ${CMAKE_BINARY_DIR}/conf/melon.conf
OUTPUT_FILE ${CMAKE_BINARY_DIR}/conf/melon.conf.tmp
)
execute_process(
COMMAND mv ${CMAKE_BINARY_DIR}/conf/melon.conf.tmp ${CMAKE_BINARY_DIR}/conf/melon.conf
)
install(DIRECTORY conf include DESTINATION /usr/local/melon)
install(FILES ${CMAKE_BINARY_DIR}/conf/melon.conf DESTINATION /usr/local/melon/conf)
install(TARGETS melon melon_static
ARCHIVE DESTINATION /usr/local/melon/lib
LIBRARY DESTINATION /usr/local/melon/lib
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Rust
1
https://gitee.com/ikkkkeee/rust-Melon.git
[email protected]:ikkkkeee/rust-Melon.git
ikkkkeee
rust-Melon
rust-Melon
main

搜索帮助