mirror of
https://github.com/yoboujon/yoyo_card.git
synced 2025-06-08 14:40:50 +02:00
Fixed some issues with Windows.
This commit is contained in:
parent
049470b508
commit
65552b7301
3 changed files with 15 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.21)
|
||||
|
||||
project(yoyo_card)
|
||||
|
||||
# C/C++ Standard
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
|
12
game.cmake
12
game.cmake
|
@ -1,6 +1,6 @@
|
|||
# Project
|
||||
project(
|
||||
yoyo_card
|
||||
game
|
||||
VERSION 1.0.0
|
||||
DESCRIPTION "Gabo card game recreation."
|
||||
HOMEPAGE_URL "https://www.etheryo.fr"
|
||||
|
@ -23,9 +23,15 @@ target_link_libraries(${TARGET} raylib)
|
|||
|
||||
# Compilation depending on the platform
|
||||
if(MSVC)
|
||||
target_compile_options(${TARGET} PUBLIC /W3 /WX /DEBUG )
|
||||
# Build the program as a window-only (no cmd)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
target_link_options(${TARGET} PRIVATE "/SUBSYSTEM:WINDOWS")
|
||||
target_compile_options(${TARGET} PRIVATE /W3 /WX )
|
||||
else()
|
||||
target_compile_options(${TARGET} PUBLIC -Wall -Wextra -Wpedantic -Werror)
|
||||
target_compile_options(${TARGET} PRIVATE /W3 /WX /DEBUG )
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Wpedantic -Werror)
|
||||
endif()
|
||||
|
||||
# Output folder
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#include <raylib.h>
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_DEBUG)
|
||||
#define main WinMain
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
const int screenWidth = 800;
|
||||
|
|
Loading…
Add table
Reference in a new issue