4
0
mirror of https://github.com/QuasarApp/CMake.git synced 2025-05-01 20:19:42 +00:00
CMake/ProjectOut.cmake

45 lines
1.3 KiB
CMake
Raw Normal View History

2019-08-31 18:18:50 +03:00
#
2020-12-17 18:11:22 +03:00
# Copyright (C) 2018-2021 QuasarApp.
2019-08-31 18:18:50 +03:00
# Distributed under the MIT software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
2020-12-12 12:40:24 +03:00
#
# This module configure pathes of the targets.
# If you include this method befor adding targets then tahen all targets of subproject reconfigured for root project when this vile has been invoked.
#
if(DEFINED PROJECT_OUT_SUPPORT)
return()
else()
set(PROJECT_OUT_SUPPORT 1)
endif()
2019-08-31 18:18:50 +03:00
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
ENDIF(NOT CMAKE_BUILD_TYPE)
2020-05-22 12:54:05 +03:00
IF(CMAKE_BUILD_TYPE MATCHES Release)
add_definitions(-DRELEASE_BUILD)
ENDIF()
2019-08-31 18:18:50 +03:00
SET(LIB_OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE})
message("${} LIB_OUTPUT_DIR = ${LIB_OUTPUT_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR})
SET(${PROJECT_NAME}_BIN_DIR ${LIB_OUTPUT_DIR})
2019-08-31 18:18:50 +03:00
message(STATUS "buid type " ${CMAKE_BUILD_TYPE})
message(STATUS "Project " ${PROJECT_NAME})
message(STATUS "c compiler " ${CMAKE_C_COMPILER})
message(STATUS "cxx compiler " ${CMAKE_CXX_COMPILER})
message(STATUS "build shared " ${BUILD_SHARED_LIBS})
message(STATUS "qmake exec " ${QT_QMAKE_EXECUTABLE})