diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index c4fa71f59..3142196df 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -80,13 +80,13 @@ jobs: - name: Archive files run: | - cd bin + cd ${{env.BUILD_DIR}}/bin 7z a -tzip ${{env.ARCHIVE_FILENAME}} "x64_${{env.BUILD_TYPE}}" - name: Archive this artefact uses: actions/upload-artifact@v3 with: name: snapshot-${{matrix.TYPE}} - path: "bin/${{env.ARCHIVE_FILENAME}}" + path: "${{env.BUILD_DIR}}/bin/${{env.ARCHIVE_FILENAME}}" upload: runs-on: windows-2022 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index fd79b735c..1b7dd6e61 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -59,14 +59,14 @@ jobs: - name: Archive files run: | - cd bin + cd ${{env.BUILD_DIR}}/bin 7z a -tzip ${{env.ARCHIVE_FILENAME}} x64_Release - name: Archive this artefact uses: actions/upload-artifact@v3 with: name: snapshot - path: "bin/${{env.ARCHIVE_FILENAME}}" + path: "${{env.BUILD_DIR}}/bin/${{env.ARCHIVE_FILENAME}}" notify: name: Discord Notification diff --git a/CMakeLists.txt b/CMakeLists.txt index 234d6efad..0c501ca39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,10 +156,10 @@ if(WIN32) set(CONF_DIR ${BIN_DIR}) get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) # ninja generator does not support $(Configuration) if(MSVC AND "$ENV{CLION_IDE}" STREQUAL "" AND IS_MULTI_CONFIG) - set(DEV_BIN_DIR ${CMAKE_SOURCE_DIR}/${BIN_FOLDER_NAME}/${DEP_ARCH}_$(Configuration)) + set(DEV_BIN_DIR ${DEV_BINARY_DIR}/${BIN_FOLDER_NAME}/${DEP_ARCH}_$(Configuration)) set(DEV_PROVIDED_LIBS_FOLDER ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_$(Configuration)) else() - set(DEV_BIN_DIR ${CMAKE_SOURCE_DIR}/${BIN_FOLDER_NAME}/${DEP_ARCH}_${CMAKE_BUILD_TYPE}) + set(DEV_BIN_DIR ${DEV_BINARY_DIR}/${BIN_FOLDER_NAME}/${DEP_ARCH}_${CMAKE_BUILD_TYPE}) set(DEV_PROVIDED_LIBS_FOLDER ${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_${CMAKE_BUILD_TYPE}) endif() @@ -308,7 +308,7 @@ endif() configure_file( ${CMAKE_SOURCE_DIR}/src/shared/revision.h.in - ${CMAKE_SOURCE_DIR}/src/shared/revision.h + ${CMAKE_BINARY_DIR}/src/shared/revision.h @ONLY ) diff --git a/cmake/options.cmake b/cmake/options.cmake index 2b3491142..ed94c24a1 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -12,6 +12,7 @@ option(BUILD_AHBOT "Build Auction House Bot mod" OFF) option(BUILD_RECASTDEMOMOD "Build map/vmap/mmap viewer" OFF) option(BUILD_GIT_ID "Build git_id" OFF) option(BUILD_DOCS "Build documentation with doxygen" OFF) +set(DEV_BINARY_DIR ${CMAKE_BINARY_DIR} CACHE STRING "Executable directory on Windows") # TODO: options that should be checked/created: #option(CLI "With CLI" ON) @@ -39,6 +40,8 @@ message(STATUS BUILD_GIT_ID Build git_id BUILD_DOCS Build documentation with doxygen + DEV_BINARY_DIR Target directory for executables on Windows only + To set an option simply type -D