Fix building on Windows by dpeter99

Fix CMake invocation that confused it into using Visual Studio build tools..
This commit is contained in:
dpeter99 2020-10-18 18:27:07 +02:00 committed by Curle
parent b4121964c5
commit fe15a79fc3
Signed by: TheCurle
GPG Key ID: 5942F13718443F79
4 changed files with 7 additions and 9 deletions

View File

@ -1,5 +1,8 @@
#project config
cmake_minimum_required(VERSION 3.10)
set(CMAKE_C_COMPILER x86_64-elf-gcc)
# cheat the compile test
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
SET(CMAKE_SYSTEM_NAME Generic)
@ -52,9 +55,3 @@ add_executable(kernel)
target_sources(kernel PUBLIC ${src_preamble} PUBLIC ${src_files} PUBLIC ${src_no_sse} PUBLIC ${lib_files} PUBLIC ${CMAKE_SOURCE_DIR}/font.o PUBLIC ${src_epilogue})
target_compile_options(kernel PRIVATE -ffreestanding -O2 -Wall -Wextra -Wall -Werror -pedantic -fPIC -fno-exceptions )
target_link_options(kernel PRIVATE -T linker.ld -ffreestanding -O2 -nostdlib -nostartfiles -lgcc)
add_custom_command(
TARGET kernel
# POST_BUILD
# COMMAND bash post.sh
)

View File

@ -19,7 +19,8 @@
#include <kernel/system/memory.h>
#include <kernel/system/pci.h>
#include <kernel/system/screen.h>
//Removed cause "wacky copyrighted stuff"
//#include <kernel/system/screen.h>
extern size_t LoadAddr;
extern bootinfo bootldr;

View File

@ -1,5 +1,5 @@
#include <kernel/chroma.h>
#include <kernel/system/screen.h>
//#include <kernel/system/screen.h>
/************************
*** Team Kitty, 2020 ***

2
pre.sh
View File

@ -1,3 +1,3 @@
#!/bin/sh
x86_64-elf-ld -r -b binary -o font.o font.psf
cmake -DCMAKE_C_COMPILER=x86_64-elf-gcc .
cmake -G"Unix Makefiles" .