Скорректировал все файлы CMakeLists.txt для Release64

This commit is contained in:
krivoshein
2025-01-15 09:43:40 +03:00
parent 8f051d1003
commit ce337ae6c8
5 changed files with 71 additions and 26 deletions

View File

@@ -12,6 +12,14 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(PROJECT_TYPE_DEBUG TRUE)
endif()
if(PROJECT_TYPE_DEBUG)
add_definitions(-DPROJECT_TYPE_DEBUG)
endif()
find_package(Qt5 COMPONENTS Widgets REQUIRED)
find_package(Qt5 COMPONENTS Sql REQUIRED)
find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
@@ -46,14 +54,34 @@ target_link_libraries(DataBaseLMS PRIVATE Qt5::Sql)
target_compile_definitions(DataBaseLMS PRIVATE DATABASELMS_LIBRARY)
message("${REPO_PATH}")
add_custom_command(TARGET DataBaseLMS
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${REPO_PATH}/BUILDS/DB_LMS/Debug64/libDataBaseLMS.dll
${REPO_PATH}/BUILDS/TestServerLMS/Debug64)
add_custom_command(TARGET DataBaseLMS
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${REPO_PATH}/BUILDS/DB_LMS/Debug64/libDataBaseLMS.dll
${REPO_PATH}/BUILDS/GUIdataBaseLMS/Debug64)
if(PROJECT_TYPE_DEBUG)
add_custom_command(TARGET DataBaseLMS
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${REPO_PATH}/BUILDS/DB_LMS/Debug64/libDataBaseLMS.dll
${REPO_PATH}/BUILDS/TestServerLMS/Debug64)
add_custom_command(TARGET DataBaseLMS
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${REPO_PATH}/BUILDS/DB_LMS/Debug64/libDataBaseLMS.dll
${REPO_PATH}/BUILDS/GUIdataBaseLMS/Debug64)
elseif()
add_custom_command(TARGET DataBaseLMS
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${REPO_PATH}/BUILDS/DB_LMS/Release64/libDataBaseLMS.dll
${REPO_PATH}/BUILDS/TestServerLMS/Release64)
add_custom_command(TARGET DataBaseLMS
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${REPO_PATH}/BUILDS/DB_LMS/Release64/libDataBaseLMS.dll
${REPO_PATH}/BUILDS/GUIdataBaseLMS/Release64)
endif()