From 67f183f2065d8d8de3c345f88bc5dd76232ba1a0 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 30 Aug 2017 16:33:44 -0700 Subject: Avoid using wmain on Windows --- native-tools/CMakeLists.txt | 7 ++++--- native-tools/bsincgen.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'native-tools') diff --git a/native-tools/CMakeLists.txt b/native-tools/CMakeLists.txt index 3c66c8bc..c3055f8d 100644 --- a/native-tools/CMakeLists.txt +++ b/native-tools/CMakeLists.txt @@ -4,6 +4,10 @@ project(native-tools) include(CheckLibraryExists) +if(WIN32) + add_definitions("-D_WIN32") +endif(WIN32) + check_library_exists(m pow "" HAVE_LIBM) add_executable(bin2h bin2h.c) @@ -20,6 +24,3 @@ set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CM if(HAVE_LIBM) target_link_libraries(bsincgen m) endif(HAVE_LIBM) -if(WIN32 AND CMAKE_COMPILER_IS_GNUCC) - set_property(TARGET bsincgen APPEND_STRING PROPERTY LINK_FLAGS " -municode") -endif(WIN32 AND CMAKE_COMPILER_IS_GNUCC) diff --git a/native-tools/bsincgen.c b/native-tools/bsincgen.c index 754e0709..e502cdd0 100644 --- a/native-tools/bsincgen.c +++ b/native-tools/bsincgen.c @@ -362,6 +362,8 @@ int main(int argc, char *argv[]) { FILE *output; + GET_UNICODE_ARGS(&argc, &argv); + if(argc > 2) { fprintf(stderr, "Usage: %s [output file]\n", argv[0]); -- cgit v1.2.3