aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/QbsBuildConfig.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QbsBuildConfig.cmake')
-rw-r--r--cmake/QbsBuildConfig.cmake11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmake/QbsBuildConfig.cmake b/cmake/QbsBuildConfig.cmake
index a29f550f2..e0a7d76d7 100644
--- a/cmake/QbsBuildConfig.cmake
+++ b/cmake/QbsBuildConfig.cmake
@@ -2,7 +2,9 @@ option(WITH_TESTS "Build Tests" ON)
option(WITH_UNIT_TESTS "Build Unit Tests" OFF)
option(INSTALL_PUBLIC_HEADERS "Whether to install public headers" ON)
option(QBS_ENABLE_RPATH "Whether to enable RPATH" ON)
-option(QBS_USE_BUNDLED_QT_SCRIPT "Whether to use bundled QtScript module" OFF)
+
+include(CMakeDependentOption)
+cmake_dependent_option(QBS_QUICKJS_LEAK_CHECK "Whether to check for quickjs leaks at the end" ON "CMAKE_BUILD_TYPE STREQUAL Debug" OFF)
set(QBS_APP_INSTALL_DIR "bin" CACHE STRING "Relative install location for Qbs binaries.")
# default paths
@@ -24,6 +26,7 @@ set(QBS_PLUGINS_INSTALL_BASE "${QBS_LIBDIR_NAME}" CACHE STRING "Relative install
set(QBS_RESOURCES_INSTALL_BASE "." CACHE STRING "Relative install location for Qbs resources.")
set(QBS_HEADERS_INSTALL_DIR "include/qbs" CACHE STRING "Relative install location for Qbs headers.")
set(QBS_DOC_INSTALL_DIR "${QBS_RESOURCES_INSTALL_BASE}/share/doc/qbs" CACHE STRING "Relative install location for Qbs documentation.")
+set(QBS_DOC_HTML_DIR_NAME "html" CACHE STRING "The name of the dir with HTML files, appended to QBS_DOC_INSTALL_DIR.")
set(QBS_PLUGINS_INSTALL_DIR "${QBS_PLUGINS_INSTALL_BASE}/qbs/plugins")
set(QBS_RESOURCES_INSTALL_DIR "${QBS_RESOURCES_INSTALL_BASE}/share")
@@ -82,6 +85,9 @@ set(DEFAULT_DEFINES "")
if(WIN32)
list(APPEND DEFAULT_DEFINES UNICODE _UNICODE _SCL_SECURE_NO_WARNINGS)
endif()
+if(WITH_TESTS)
+ list(APPEND DEFAULT_DEFINES QBS_WITH_TESTS)
+endif()
# CMake 3.10 doesn't have list(TRANSFORM)
function(list_transform_prepend var prefix)
@@ -172,6 +178,9 @@ function(add_qbs_library target_name)
RUNTIME DESTINATION ${QBS_DLL_INSTALL_DIR}
)
endif()
+ if(MSVC)
+ target_compile_options(${target_name} PUBLIC /EHsc)
+ endif()
endfunction()
function(add_qbs_plugin target_name)