mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-08 20:19:04 +03:00
build: fix msvc builds
This commit is contained in:
2
.github/workflows/Test PKGBUILD-git.yml
vendored
2
.github/workflows/Test PKGBUILD-git.yml
vendored
@@ -2,7 +2,7 @@ name: Test PKGBUILD-git
|
||||
|
||||
on:
|
||||
push:
|
||||
branch: master
|
||||
branches: master
|
||||
pull_request:
|
||||
branches: master
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
out
|
||||
|
||||
build/
|
||||
build-msvc/
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
cmake_install.cmake
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace clrsync::core
|
||||
{
|
||||
|
||||
const std::string GIT_SEMVER = "0.1.6+git.g57c3c55";
|
||||
const std::string GIT_SEMVER = "0.1.6+git.g1a1747a";
|
||||
|
||||
const std::string version_string();
|
||||
} // namespace clrsync::core
|
||||
|
||||
@@ -19,7 +19,11 @@ if(APPLE)
|
||||
list(APPEND GUI_SOURCES file_browser_macos.mm)
|
||||
endif()
|
||||
|
||||
add_executable(clrsync_gui ${GUI_SOURCES})
|
||||
if(WIN32)
|
||||
add_executable(clrsync_gui WIN32 ${GUI_SOURCES})
|
||||
else()
|
||||
add_executable(clrsync_gui ${GUI_SOURCES})
|
||||
endif()
|
||||
|
||||
target_include_directories(clrsync_gui PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
@@ -38,7 +42,9 @@ if(WIN32)
|
||||
comdlg32
|
||||
shlwapi
|
||||
)
|
||||
set_target_properties(clrsync_gui PROPERTIES WIN32_EXECUTABLE TRUE)
|
||||
if (MSVC)
|
||||
target_link_options(clrsync_gui PRIVATE /ENTRY:mainCRTStartup)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
target_link_libraries(clrsync_gui PRIVATE
|
||||
clrsync_core
|
||||
|
||||
Reference in New Issue
Block a user