File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ script:
86
86
make test || travis_terminate 1;
87
87
coveralls --exclude vendor --exclude src --exclude build --exclude tools --exclude libaegisub/windows > /dev/null;
88
88
else
89
- ./build/version.sh .;
90
89
mkdir build-dir;
91
90
cd build-dir;
92
91
cmake -DCMAKE_CXX_FLAGS='-Wall -Wextra -Wno-unused-parameter -pedantic' -DCMAKE_C_FLAGS='-Wall' -DWITH_STARTUPLOG=ON -DWITH_TEST=ON ..;
Original file line number Diff line number Diff line change @@ -470,6 +470,23 @@ add_executable(Aegisub WIN32
470
470
target_link_libraries (Aegisub ${CMAKE_DL_LIBS} libaegisub luabins luajit resrc csri)
471
471
target_compile_definitions (Aegisub PRIVATE CMAKE_BUILD)
472
472
473
+ if (WIN32 )
474
+ if (NOT EXISTS "${PROJECT_SOURCE_DIR} /build/git_version.h" )
475
+ message (SEND_ERROR
476
+ "build/git_version.h not found.\n "
477
+ "Automatic generation of build/git_version.h is not supported on Windows. Please run\n "
478
+ " build/version.sh .\n "
479
+ "at the source directory from an environment with bash and git. You may use WSL, msys (git bash), or Cygwin."
480
+ )
481
+ endif ()
482
+ else ()
483
+ add_custom_target (git_version build /version .sh .
484
+ BYPRODUCTS "${PROJECT_SOURCE_DIR} /build/git_version.h" "${PROJECT_SOURCE_DIR} /build/git_version.xml"
485
+ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR} "
486
+ )
487
+ add_dependencies (Aegisub git_version)
488
+ endif ()
489
+
473
490
set (WITH_BUILD_CREDIT OFF CACHE BOOL "Whether show build credit in about dialog" )
474
491
if (WITH_BUILD_CREDIT)
475
492
set (BUILD_CREDIT "" CACHE STRING "Build credit shown in about dialog" )
You can’t perform that action at this time.
0 commit comments