- Use forward instead of backward slashes for paths on Windows in build system and CI
This commit is contained in:
parent
77c2a6ff68
commit
0db865095b
@ -35,7 +35,7 @@ install:
|
||||
build_script:
|
||||
- cmd: mkdir build
|
||||
- cmd: cd build
|
||||
- cmd: cmake .. -G "%generator%" -DBUILD_TESTING=on -DBOOST_ROOT=C:\Libraries\boost_1_65_1 -DDOKAN_PATH="C:\Program Files\Dokan\DokanLibrary-1.1.0"
|
||||
- cmd: cmake .. -G "%generator%" -DBUILD_TESTING=on -DBOOST_ROOT="C:/Libraries/boost_1_65_1" -DDOKAN_PATH="C:/Program Files/Dokan/DokanLibrary-1.1.0"
|
||||
# TODO Make build parallel
|
||||
- cmd: cmake --build . --config %CONFIGURATION%
|
||||
- cmd: .\test\gitversion\%CONFIGURATION%\gitversion-test.exe
|
||||
|
@ -18,15 +18,11 @@ function(append_build_number VERSION_NUMBER OUTPUT)
|
||||
set(${OUTPUT} "${STRIPPED_VERSION_NUMBER}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# We only allow generating distribution packages if:
|
||||
# - it is a release build (to ensure all generated debian packages are fine to be distributed)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILDTYPE)
|
||||
if(BUILDTYPE MATCHES RELEASE OR BUILDTYPE MATCHES RELWITHDEBINFO)
|
||||
if("${CMAKE_VERSION}" VERSION_LESS "3.3")
|
||||
if("${CMAKE_VERSION}" VERSION_LESS "3.3")
|
||||
# Earlier cmake versions generate .deb packages for which the package manager says they're bad quality
|
||||
# and asks the user whether they really want to install it. Cmake 3.3 fixes this.
|
||||
message(WARNING "Distribution package generation is only supported for CMake version >= 3.3. You're using ${CMAKE_VERSION}. You will be able to build and install CryFS, but you won't be able to generate .deb packages.")
|
||||
else("${CMAKE_VERSION}" VERSION_LESS "3.3")
|
||||
else()
|
||||
# Fix debfiles permissions. Unfortunately, git doesn't store file permissions.
|
||||
# When installing the .deb package and these files have the wrong permissions, the package manager complains.
|
||||
execute_process(COMMAND /bin/bash -c "chmod 0755 ${CMAKE_CURRENT_SOURCE_DIR}/debfiles/*")
|
||||
@ -73,5 +69,4 @@ if(BUILDTYPE MATCHES RELEASE OR BUILDTYPE MATCHES RELWITHDEBINFO)
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postinst;${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postrm")
|
||||
|
||||
include(CPack)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -21,18 +21,18 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
if ("${TARGET_ARCH}" STREQUAL "x86_64")
|
||||
set(DOKAN_LIB_PATH "${DOKAN_PATH}")
|
||||
elseif("${TARGET_ARCH}" STREQUAL "i386")
|
||||
set(DOKAN_LIB_PATH "${DOKAN_PATH}\\x86")
|
||||
set(DOKAN_LIB_PATH "${DOKAN_PATH}/x86")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported architecture: ${TARGET_ARCH}")
|
||||
endif()
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC "${DOKAN_PATH}\\include")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC "${DOKAN_LIB_PATH}\\lib\\dokan1.lib")
|
||||
#target_link_libraries(${PROJECT_NAME} PUBLIC "${DOKAN_LIB_PATH}\\lib\\dokannp1.lib")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC "${DOKAN_LIB_PATH}\\lib\\dokanfuse1.lib")
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC "${DOKAN_PATH}/include")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC "${DOKAN_LIB_PATH}/lib/dokan1.lib")
|
||||
#target_link_libraries(${PROJECT_NAME} PUBLIC "${DOKAN_LIB_PATH}/lib/dokannp1.lib")
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC "${DOKAN_LIB_PATH}/lib/dokanfuse1.lib")
|
||||
|
||||
install(FILES ${DOKAN_LIB_PATH}\\dokan1.dll ${DOKAN_LIB_PATH}\\dokanfuse1.dll
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
install(FILES "${DOKAN_LIB_PATH}/dokan1.dll" "${DOKAN_LIB_PATH}/dokanfuse1.dll"
|
||||
DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
)
|
||||
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
Loading…
x
Reference in New Issue
Block a user