diff --git a/CMakeLists.txt b/CMakeLists.txt index 35c7c57..33e7535 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,9 +8,10 @@ option(COMPILE_PLAYER "Compile the RNR player" ON) option(COMPILE_STUDIO "Compile the RNR studio" ON) option(COMPILE_SERVER "Compile the RNR server" ON) -set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/dist") set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/Dependencies) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes -Wno-return-type") # Ignore warnings generated by Luau and Qt +set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist) + +add_compile_options(-Wno-attributes -Wno-return-type) # Ignore warnings generated by Luau and Qt find_package(Boost REQUIRED) find_package(OGRE REQUIRED COMPONENTS Bites CONFIG) diff --git a/Projects/Client/Common/CMakeLists.txt b/Projects/Client/Common/CMakeLists.txt index 6bdd7d1..7999bda 100644 --- a/Projects/Client/Common/CMakeLists.txt +++ b/Projects/Client/Common/CMakeLists.txt @@ -12,5 +12,13 @@ list(APPEND HEADER qt_standard_project_setup() qt_add_library(Common STATIC ${SOURCE} ${HEADER}) +if(WIN32) + add_custom_command(TARGET Common POST_BUILD + COMMAND ${TOOL_WINDEPLOYQT} + $ + COMMENT "Running windeployqt..." + ) +endif() + target_include_directories(Common PUBLIC Header) target_link_libraries(Common PUBLIC ${QT6_LIBRARIES_INCL} Engine) \ No newline at end of file diff --git a/Projects/Client/Player/CMakeLists.txt b/Projects/Client/Player/CMakeLists.txt index 798c405..f28e861 100644 --- a/Projects/Client/Player/CMakeLists.txt +++ b/Projects/Client/Player/CMakeLists.txt @@ -18,6 +18,13 @@ endif() qt_add_executable(Player ${SOURCE} ${HEADER}) +if(WIN32 OR MINGW) + add_custom_command(TARGET Player POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy -t $ $ + COMMAND_EXPAND_LISTS + ) +endif() + target_include_directories(Player PRIVATE Header) target_link_libraries(Player PRIVATE Common Engine) diff --git a/Projects/Client/Server/CMakeLists.txt b/Projects/Client/Server/CMakeLists.txt index 9b42ddc..3ff1c02 100644 --- a/Projects/Client/Server/CMakeLists.txt +++ b/Projects/Client/Server/CMakeLists.txt @@ -9,5 +9,12 @@ endif() add_executable(Server ${SOURCE} ${HEADER}) +if(WIN32 OR MINGW) + add_custom_command(TARGET Server POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy -t $ $ + COMMAND_EXPAND_LISTS + ) +endif() + target_include_directories(Server PRIVATE Header) target_link_libraries(Server PRIVATE Engine) \ No newline at end of file diff --git a/Projects/Client/Studio/CMakeLists.txt b/Projects/Client/Studio/CMakeLists.txt index 9950e48..2509250 100644 --- a/Projects/Client/Studio/CMakeLists.txt +++ b/Projects/Client/Studio/CMakeLists.txt @@ -18,6 +18,12 @@ endif() qt_add_executable(Studio ${SOURCE} ${HEADER}) +if(WIN32 OR MINGW) + add_custom_command(TARGET Studio POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy -t $ $ + COMMAND_EXPAND_LISTS + ) +endif() target_include_directories(Studio PRIVATE Header) target_link_libraries(Studio PRIVATE Common Engine)