mirror of
https://github.com/yoboujon/yoyo_card.git
synced 2025-06-08 19:10:49 +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)
|
cmake_minimum_required(VERSION 3.21)
|
||||||
|
|
||||||
|
project(yoyo_card)
|
||||||
|
|
||||||
# C/C++ Standard
|
# C/C++ Standard
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
12
game.cmake
12
game.cmake
|
@ -1,6 +1,6 @@
|
||||||
# Project
|
# Project
|
||||||
project(
|
project(
|
||||||
yoyo_card
|
game
|
||||||
VERSION 1.0.0
|
VERSION 1.0.0
|
||||||
DESCRIPTION "Gabo card game recreation."
|
DESCRIPTION "Gabo card game recreation."
|
||||||
HOMEPAGE_URL "https://www.etheryo.fr"
|
HOMEPAGE_URL "https://www.etheryo.fr"
|
||||||
|
@ -23,9 +23,15 @@ target_link_libraries(${TARGET} raylib)
|
||||||
|
|
||||||
# Compilation depending on the platform
|
# Compilation depending on the platform
|
||||||
if(MSVC)
|
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()
|
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()
|
endif()
|
||||||
|
|
||||||
# Output folder
|
# Output folder
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#include <raylib.h>
|
#include <raylib.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && !defined(_DEBUG)
|
||||||
|
#define main WinMain
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
const int screenWidth = 800;
|
const int screenWidth = 800;
|
||||||
|
|
Loading…
Add table
Reference in a new issue