mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-08 20:19:04 +03:00
chore: fixed windows branch in get_user_config_dir()
This commit is contained in:
@@ -56,6 +56,7 @@ set(CORE_SOURCES
|
|||||||
src/core/theme/theme_template.cpp
|
src/core/theme/theme_template.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
add_library(clrsync_core SHARED ${CORE_SOURCES})
|
add_library(clrsync_core SHARED ${CORE_SOURCES})
|
||||||
target_include_directories(clrsync_core PUBLIC src SYSTEM lib)
|
target_include_directories(clrsync_core PUBLIC src SYSTEM lib)
|
||||||
target_compile_definitions(clrsync_core PRIVATE
|
target_compile_definitions(clrsync_core PRIVATE
|
||||||
@@ -79,9 +80,13 @@ set(GUI_SOURCES
|
|||||||
src/gui/settings_window.cpp
|
src/gui/settings_window.cpp
|
||||||
src/gui/font_loader.cpp
|
src/gui/font_loader.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(clrsync_gui ${GUI_SOURCES})
|
add_executable(clrsync_gui ${GUI_SOURCES})
|
||||||
target_include_directories(clrsync_gui PRIVATE src SYSTEM lib)
|
target_include_directories(clrsync_gui PRIVATE src SYSTEM lib)
|
||||||
|
if(WIN32)
|
||||||
|
set_target_properties(clrsync_gui PROPERTIES
|
||||||
|
LINK_FLAGS "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(clrsync_gui PRIVATE clrsync_core glfw freetype imgui OpenGL::GL)
|
target_link_libraries(clrsync_gui PRIVATE clrsync_core glfw freetype imgui OpenGL::GL)
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ std::filesystem::path config::get_user_config_dir()
|
|||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (const char *appdata = std::getenv("APPDATA"))
|
if (const char *appdata = std::getenv("APPDATA"))
|
||||||
return fs::path(appdata) / "clrsync";
|
return std::filesystem::path(appdata) / "clrsync";
|
||||||
else
|
else
|
||||||
return fs::path("C:/clrsync");
|
return std::filesystem::path("C:/clrsync");
|
||||||
#else
|
#else
|
||||||
if (const char *xdg = std::getenv("XDG_CONFIG_HOME"))
|
if (const char *xdg = std::getenv("XDG_CONFIG_HOME"))
|
||||||
return std::filesystem::path(xdg) / "clrsync";
|
return std::filesystem::path(xdg) / "clrsync";
|
||||||
|
|||||||
Reference in New Issue
Block a user