meta: add metadata to win32 exe/dll files
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -328,3 +328,4 @@ $RECYCLE.BIN/
|
||||
# End of https://www.toptal.com/developers/gitignore/api/linux,vim,c,cmake,macos,visualstudiocode,windows,node
|
||||
|
||||
build/
|
||||
*.bak
|
||||
@@ -1,6 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(ivy C)
|
||||
|
||||
if (WIN32)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
SET(CMAKE_RC_COMPILE_OBJECT
|
||||
"<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||
endif ()
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
file(GLOB_RECURSE asm_sources *.c *.h include/ivy/asm/*.h)
|
||||
|
||||
if (WIN32)
|
||||
set(rc_file ${CMAKE_CURRENT_SOURCE_DIR}/../res/build/asm.rc)
|
||||
endif ()
|
||||
|
||||
if (IVY_STATIC)
|
||||
add_library(ivy-asm STATIC ${asm_sources})
|
||||
add_library(ivy-asm STATIC ${asm_sources} ${rc_file})
|
||||
else ()
|
||||
add_library(ivy-asm SHARED ${asm_sources})
|
||||
add_library(ivy-asm SHARED ${asm_sources} ${rc_file})
|
||||
endif ()
|
||||
|
||||
target_include_directories(ivy-asm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/)
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
file(GLOB_RECURSE common_sources *.c *.h include/ivy/*.h)
|
||||
|
||||
if (WIN32)
|
||||
set(rc_file ${CMAKE_CURRENT_SOURCE_DIR}/../res/build/common.rc)
|
||||
endif ()
|
||||
|
||||
if (IVY_STATIC)
|
||||
add_library(ivy-common STATIC ${common_sources})
|
||||
add_library(ivy-common STATIC ${common_sources} ${rc_file})
|
||||
else ()
|
||||
add_library(ivy-common SHARED ${common_sources})
|
||||
add_library(ivy-common SHARED ${common_sources} ${rc_file})
|
||||
endif ()
|
||||
|
||||
target_include_directories(ivy-common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/)
|
||||
|
||||
@@ -9,7 +9,11 @@ file(GLOB_RECURSE sys_sources
|
||||
sys/${system_name}/*.c
|
||||
sys/${system_name}/*.h)
|
||||
|
||||
add_executable(ivy ${ivy_sources} ${sys_sources})
|
||||
if (WIN32)
|
||||
set(rc_file ${CMAKE_CURRENT_SOURCE_DIR}/../res/build/frontend.rc)
|
||||
endif ()
|
||||
|
||||
add_executable(ivy ${ivy_sources} ${sys_sources} ${rc_file})
|
||||
target_link_libraries(
|
||||
ivy
|
||||
ivy-rt
|
||||
|
||||
@@ -29,6 +29,18 @@ static void skip_line(struct ivy_lexer *lex)
|
||||
|
||||
int repl(const b_command *cmd, const b_arglist *args, const b_array *_)
|
||||
{
|
||||
b_printf("[bold,bright_red]error[[E0384][reset,bold,white]: cannot assign twice to immutable variable `i`[reset]\n");
|
||||
b_printf("[bold,bright_blue] -->[reset] src/main.rs:7:3\n");
|
||||
b_printf("[bold,bright_blue] |[reset]\n");
|
||||
b_printf("[bold,bright_blue]4 |[reset] let i = 0;\n");
|
||||
b_printf("[bold,bright_blue] | -[reset]\n");
|
||||
b_printf("[bold,bright_blue] | |[reset]\n");
|
||||
b_printf("[bold,bright_blue] | first assignment to `i`[reset]\n");
|
||||
b_printf("[bold,bright_blue] | help: make this binding mutable: `mut i`[reset]\n");
|
||||
b_printf("[bold,bright_blue]...[reset]\n");
|
||||
b_printf("[bold,bright_blue]7 |[reset] i += 1;\n");
|
||||
b_printf("[bold,bright_blue] |[bold,bright_red] ^^^^^^ cannot assign twice to immutable variable[reset]\n");
|
||||
|
||||
bool show_lex
|
||||
= b_arglist_get_count(args, OPT_SHOW_LEX_TOKENS, B_COMMAND_INVALID_ID) > 0;
|
||||
bool show_ast
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
file(GLOB_RECURSE lang_sources *.c *.h include/ivy/lang/*.h)
|
||||
|
||||
if (WIN32)
|
||||
set(rc_file ${CMAKE_CURRENT_SOURCE_DIR}/../res/build/lang.rc)
|
||||
endif ()
|
||||
|
||||
if (IVY_STATIC)
|
||||
add_library(ivy-lang STATIC ${lang_sources})
|
||||
add_library(ivy-lang STATIC ${lang_sources} ${rc_file})
|
||||
else ()
|
||||
add_library(ivy-lang SHARED ${lang_sources})
|
||||
add_library(ivy-lang SHARED ${lang_sources} ${rc_file})
|
||||
endif ()
|
||||
|
||||
target_include_directories(ivy-lang PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/)
|
||||
|
||||
BIN
res/gfx/logo-small.ico
Normal file
BIN
res/gfx/logo-small.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
res/gfx/logo.ico
Normal file
BIN
res/gfx/logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
BIN
res/gfx/logo.png
Normal file
BIN
res/gfx/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
63
res/gfx/logo.svg
Normal file
63
res/gfx/logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 38 KiB |
@@ -1,9 +1,13 @@
|
||||
file(GLOB_RECURSE rt_sources *.c *.h include/ivy/rt/*.h)
|
||||
|
||||
if (WIN32)
|
||||
set(rc_file ${CMAKE_CURRENT_SOURCE_DIR}/../res/build/rt.rc)
|
||||
endif ()
|
||||
|
||||
if (IVY_STATIC)
|
||||
add_library(ivy-rt STATIC ${rt_sources})
|
||||
add_library(ivy-rt STATIC ${rt_sources} ${rc_file})
|
||||
else ()
|
||||
add_library(ivy-rt SHARED ${rt_sources})
|
||||
add_library(ivy-rt SHARED ${rt_sources} ${rc_file})
|
||||
endif ()
|
||||
|
||||
target_include_directories(ivy-rt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/)
|
||||
|
||||
Reference in New Issue
Block a user