Warning, /graphics/tikzkit/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16 FATAL_ERROR) 0002 0003 project(tikzkit VERSION "0.80") 0004 0005 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules) 0006 0007 # Find includes in corresponding build directories 0008 set(CMAKE_INCLUDE_CURRENT_DIR ON) 0009 0010 # Instruct CMake to run moc automatically when needed. 0011 set(CMAKE_AUTOMOC ON) 0012 set(CMAKE_AUTORCC ON) 0013 set(CMAKE_AUTOUIC ON) 0014 0015 find_package(Qt5 "5.15.2" NO_MODULE REQUIRED Core Widgets Svg Test) 0016 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00) 0017 add_definitions( 0018 #-DQT_NO_CAST_FROM_ASCII 0019 -DQT_NO_CAST_TO_ASCII 0020 -DQT_NO_URL_CAST_FROM_STRING 0021 -DQT_NO_CAST_FROM_BYTEARRAY 0022 -DQT_USE_QSTRINGBUILDER 0023 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT 0024 -DQT_NO_KEYWORDS 0025 -DQT_NO_FOREACH 0026 ) 0027 0028 include(FeatureSummary) 0029 0030 # prepare include folder in build dir: include/tikz/core/*.h 0031 file(GLOB_RECURSE ALL_HEADERS ${CMAKE_SOURCE_DIR}/src/core/*.h) 0032 foreach(header ${ALL_HEADERS}) 0033 file(STRINGS "${header}" lines REGEX "TIKZKITCORE_EXPORT") 0034 if(lines) 0035 file(COPY ${header} 0036 DESTINATION ${CMAKE_BINARY_DIR}/include/tikz/core/) 0037 endif() 0038 endforeach() 0039 0040 # prepare include folder in build dir: include/tikz/ui/*.h 0041 file(GLOB_RECURSE ALL_HEADERS ${CMAKE_SOURCE_DIR}/src/ui/*.h) 0042 foreach(header ${ALL_HEADERS}) 0043 file(STRINGS "${header}" lines REGEX "TIKZKITUI_EXPORT") 0044 if(lines) 0045 file(COPY ${header} 0046 DESTINATION ${CMAKE_BINARY_DIR}/include/tikz/ui/) 0047 endif() 0048 endforeach() 0049 0050 # _USE_MATH_DEFINES needed on Windows to define M_PI in <cmath> 0051 add_compile_definitions(_USE_MATH_DEFINES) 0052 0053 add_subdirectory(src/core) 0054 add_subdirectory(src/qtpropertybrowser/src) 0055 add_subdirectory(src/ui) 0056 add_subdirectory(src/app) 0057 0058 enable_testing() 0059 add_subdirectory(tests) 0060 0061 # kate: indent-width 4; replace-tabs on;