1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00

Change cmake to compile into a separate bin folder for easier deployment

This commit is contained in:
Elias Steurer 2020-06-07 13:06:55 +02:00
parent c77bdcc553
commit b13d643d44
3 changed files with 5 additions and 22 deletions

View File

@ -1,26 +1,9 @@
cmake_minimum_required(VERSION 3.16.0 )
if(WIN32)
set(VCPKG_TARGET_TRIPLET "x64-windows")
elseif(APPLE)
set(VCPKG_TARGET_TRIPLET "x64-osx")
elseif(UNIX)
set(VCPKG_TARGET_TRIPLET "x64-linux")
endif()
set(ABSOLUTE_VCPKG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake)
# If setting the toolchain file fails we can the it inside QtCreator: Extras ->
# Tools -> Kits -> <Your Kit> -> CMake Configuration -> Append this:
# CMAKE_TOOLCHAIN_FILE:STRING=%{CurrentProject:Path}/Common/vcpkg/scripts/buildsystems/vcpkg.cmake
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE ${ABSOLUTE_VCPKG_PATH})
endif()
# This sets cmake to compile all dlls into the main directory
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_CXX_STANDARD 17)

View File

@ -84,7 +84,7 @@ target_include_directories(${PROJECT_NAME}
install(FILES
assets/fonts/NotoSansCJKkr-Regular.otf
DESTINATION
${CMAKE_BINARY_DIR}/assets/fonts/ )
${CMAKE_BINARY_DIR}/bin/assets/fonts/ )

View File

@ -59,4 +59,4 @@ target_link_libraries(${PROJECT_NAME}
install(FILES
index.html
DESTINATION
${CMAKE_BINARY_DIR} )
${CMAKE_BINARY_DIR}/bin )