Commit 9f19d64 1 parent 6a3fe28 commit 9f19d64 Copy full SHA for 9f19d64
File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ project(tophat)
5
5
if (MSVC )
6
6
set (umka_dir ${CMAKE_CURRENT_SOURCE_DIR} /lib/umka/umka_windows_msvc)
7
7
set (umka_lib_path ${umka_dir} /libumka_static.lib)
8
-
8
+
9
9
execute_process (COMMAND ${CMAKE_CURRENT_SOURCE_DIR} /cmd/win-buildmodules.bat WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULT_VARIABLE ret)
10
10
if (NOT ret EQUAL "0" )
11
11
message (FATAL_ERROR "Failed to generate staembed.c" )
@@ -15,11 +15,11 @@ if(MSVC)
15
15
"src/*.c"
16
16
)
17
17
18
- add_executable (tophat WIN32 ${th_sources} )
19
-
18
+ add_executable (tophat ${th_sources} )
19
+
20
20
# NOTE(skejeton): _USE_MATH_DEFINES flag for M_PI and so on.
21
- # NOTE(skejeton): UMKA_STATIC flag for we are linking umka statically not as a DLL.
22
- target_compile_definitions (tophat PUBLIC UMKA_STATIC _USE_MATH_DEFINES)
21
+ # NOTE(skejeton): UMKA_STATIC flag for we are linking umka statically not as a DLL.
22
+ target_compile_definitions (tophat PUBLIC UMKA_STATIC _USE_MATH_DEFINES _CONSOLE )
23
23
# target_compile_options(tophat PRIVATE /fsanitize=address)
24
24
25
25
target_include_directories (tophat PUBLIC
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ th_error(char *text, ...)
46
46
47
47
va_list args ;
48
48
va_start (args , text );
49
- #ifdef _WIN32
49
+ #if defined( _WIN32 ) && !defined( _CONSOLE )
50
50
#include <winuser.h>
51
51
char buf [4096 ];
52
52
vsnprintf (buf , 4096 , text , args );
@@ -62,7 +62,7 @@ th_info(char *text, ...)
62
62
{
63
63
va_list args ;
64
64
va_start (args , text );
65
- #ifdef _WIN32
65
+ #if defined( _WIN32 ) && !defined( _CONSOLE )
66
66
#include <winuser.h>
67
67
char buf [4096 ];
68
68
vsnprintf (buf , 4096 , text , args );
You can’t perform that action at this time.
0 commit comments