Issue #643 - Rewrite CLI vs GUI strategy (this matches DefleMask)
This commit is contained in:
parent
9c4016b86c
commit
f9cbf17a07
|
@ -780,13 +780,15 @@ endif()
|
||||||
|
|
||||||
if(ANDROID AND NOT TERMUX)
|
if(ANDROID AND NOT TERMUX)
|
||||||
add_library(furnace SHARED ${USED_SOURCES})
|
add_library(furnace SHARED ${USED_SOURCES})
|
||||||
|
elseif(WIN32)
|
||||||
|
add_executable(furnace WIN32 ${USED_SOURCES})
|
||||||
else()
|
else()
|
||||||
add_executable(furnace ${USED_SOURCES})
|
add_executable(furnace ${USED_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(furnace SYSTEM PRIVATE ${DEPENDENCIES_INCLUDE_DIRS})
|
target_include_directories(furnace SYSTEM PRIVATE ${DEPENDENCIES_INCLUDE_DIRS})
|
||||||
target_compile_definitions(furnace PRIVATE ${DEPENDENCIES_DEFINES} IMGUI_USER_CONFIG="imconfig_fur.h")
|
target_compile_definitions(furnace PRIVATE ${DEPENDENCIES_DEFINES} IMGUI_USER_CONFIG="imconfig_fur.h")
|
||||||
target_compile_options(furnace PRIVATE ${DEPENDENCIES_COMPILE_OPTIONS})
|
target_compile_options(furnace PRIVATE ${DEPENDENCIES_COMPILE_OPfTIONS})
|
||||||
target_link_libraries(furnace PRIVATE ${DEPENDENCIES_LIBRARIES})
|
target_link_libraries(furnace PRIVATE ${DEPENDENCIES_LIBRARIES})
|
||||||
if (PKG_CONFIG_FOUND AND (SYSTEM_FMT OR SYSTEM_LIBSNDFILE OR SYSTEM_ZLIB OR SYSTEM_SDL2 OR SYSTEM_RTMIDI OR WITH_JACK))
|
if (PKG_CONFIG_FOUND AND (SYSTEM_FMT OR SYSTEM_LIBSNDFILE OR SYSTEM_ZLIB OR SYSTEM_SDL2 OR SYSTEM_RTMIDI OR WITH_JACK))
|
||||||
if ("${CMAKE_VERSION}" VERSION_LESS "3.13")
|
if ("${CMAKE_VERSION}" VERSION_LESS "3.13")
|
||||||
|
|
12
src/main.cpp
12
src/main.cpp
|
@ -342,12 +342,14 @@ void reportError(String what) {
|
||||||
// TODO: CoInitializeEx on Windows?
|
// TODO: CoInitializeEx on Windows?
|
||||||
// TODO: add crash log
|
// TODO: add crash log
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
// Windows console thing - thanks MarioKart7z!
|
// Windows console thing - thanks dj.tuBIG/MaliceX
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
DWORD winPID;
|
|
||||||
HWND winConsole=GetConsoleWindow();
|
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||||
GetWindowThreadProcessId(winConsole,&winPID);
|
freopen("CONOUT$", "w", stdout);
|
||||||
if (GetCurrentProcessId()==winPID) FreeConsole();
|
freopen("CONOUT$", "w", stderr);
|
||||||
|
freopen("CONIN$", "r", stdin);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
initLog();
|
initLog();
|
||||||
|
|
Loading…
Reference in a new issue