Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Line(s) | |||||
156 | # Finding out the products & features to build is done in 5 steps: | 156 | # Finding out the products & features to build is done in 5 steps: | ||
157 | # 1. have the user define the products/features wanted, by giving a productset | 157 | # 1. have the user define the products/features wanted, by giving a productset | ||
158 | # 2. estimate all additional required products/features | 158 | # 2. estimate all additional required products/features | ||
159 | # 3. estimate which of the products/features can be build by external deps | 159 | # 3. estimate which of the products/features can be build by external deps | ||
160 | # 4. find which products/features have been temporarily disabled due to problems | 160 | # 4. find which products/features have been temporarily disabled due to problems | ||
161 | # 5. estimate which of the products/features can be build by internal deps | 161 | # 5. estimate which of the products/features can be build by internal deps | ||
162 | 162 | | |||
163 | # get the special macros | 163 | # get the special macros | ||
164 | include(CalligraProductSetMacros) | | |||
165 | include(MacroJPEG) | 164 | include(MacroJPEG) | ||
166 | include(GenerateTestExportHeader) | 165 | include(GenerateTestExportHeader) | ||
167 | 166 | | |||
168 | | ||||
169 | # get the definitions of products, features and product sets | | |||
170 | include(KritaProducts.cmake) | | |||
171 | | ||||
172 | set(PRODUCTSET_DEFAULT "ALL") | | |||
173 | # temporary migration support | | |||
174 | if (CREATIVEONLY) | | |||
175 | set(WARN_ABOUT_CREATIVEONLY TRUE) | | |||
176 | set(PRODUCTSET_DEFAULT "CREATIVE") | | |||
177 | endif () | | |||
178 | | ||||
179 | if(NOT PRODUCTSET) | | |||
180 | set(PRODUCTSET ${PRODUCTSET_DEFAULT} CACHE STRING "Set of products/features to build" FORCE) | | |||
181 | endif() | | |||
182 | | ||||
183 | if (RELEASE_BUILD) | | |||
184 | set(CALLIGRA_SHOULD_BUILD_STAGING FALSE) | | |||
185 | else () | | |||
186 | set(CALLIGRA_SHOULD_BUILD_STAGING TRUE) | | |||
187 | endif () | | |||
188 | | ||||
189 | # finally choose products/features to build | | |||
190 | calligra_set_productset(${PRODUCTSET}) | | |||
191 | | ||||
192 | ######################## | 167 | ######################## | ||
193 | ######################### | 168 | ######################### | ||
194 | ## Look for KDE and Qt ## | 169 | ## Look for KDE and Qt ## | ||
195 | ######################### | 170 | ######################### | ||
196 | ######################## | 171 | ######################## | ||
197 | 172 | | |||
198 | find_package(ECM 1.7.0 REQUIRED NOMODULE) | 173 | find_package(ECM 1.7.0 REQUIRED NOMODULE) | ||
199 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) | 174 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) | ||
▲ Show 20 Lines • Show All 363 Lines • ▼ Show 20 Line(s) | 502 | if(HAVE_VC) | |||
563 | 538 | | |||
564 | if (NOT PACKAGERS_BUILD) | 539 | if (NOT PACKAGERS_BUILD) | ||
565 | # Optimize everything for the current architecture | 540 | # Optimize everything for the current architecture | ||
566 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}") | 541 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}") | ||
567 | endif () | 542 | endif () | ||
568 | endif() | 543 | endif() | ||
569 | set(CMAKE_MODULE_PATH ${OLD_CMAKE_MODULE_PATH} ) | 544 | set(CMAKE_MODULE_PATH ${OLD_CMAKE_MODULE_PATH} ) | ||
570 | 545 | | |||
571 | ## | | |||
572 | ## Test for Xinput | | |||
573 | ## | | |||
574 | if(NOT WIN32 AND NOT APPLE) | | |||
575 | set(REQUIRED_Xinput_FOUND ${X11_Xinput_FOUND}) | | |||
576 | else() | | |||
577 | set(REQUIRED_Xinput_FOUND TRUE) | | |||
578 | endif() | | |||
579 | | ||||
580 | add_definitions(${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS}) | 546 | add_definitions(${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS}) | ||
581 | 547 | | |||
582 | if(WIN32) | 548 | if(WIN32) | ||
583 | set(LIB_INSTALL_DIR ${LIB_INSTALL_DIR} | 549 | set(LIB_INSTALL_DIR ${LIB_INSTALL_DIR} | ||
584 | RUNTIME DESTINATION ${BIN_INSTALL_DIR} | 550 | RUNTIME DESTINATION ${BIN_INSTALL_DIR} | ||
585 | LIBRARY ${INSTALL_TARGETS_DEFAULT_ARGS} | 551 | LIBRARY ${INSTALL_TARGETS_DEFAULT_ARGS} | ||
586 | ARCHIVE ${INSTALL_TARGETS_DEFAULT_ARGS} ) | 552 | ARCHIVE ${INSTALL_TARGETS_DEFAULT_ARGS} ) | ||
587 | endif() | 553 | endif() | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 615 | include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} | |||
651 | ${CMAKE_SOURCE_DIR}/interfaces | 617 | ${CMAKE_SOURCE_DIR}/interfaces | ||
652 | ) | 618 | ) | ||
653 | 619 | | |||
654 | include_directories( | 620 | include_directories( | ||
655 | ${CMAKE_SOURCE_DIR}/libs/version | 621 | ${CMAKE_SOURCE_DIR}/libs/version | ||
656 | ${CMAKE_BINARY_DIR}/libs/version | 622 | ${CMAKE_BINARY_DIR}/libs/version | ||
657 | ) | 623 | ) | ||
658 | 624 | | |||
659 | ################################################### | 625 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) | ||
660 | #################################################### | | |||
661 | ## Detect which products/features can be compiled ## | | |||
662 | #################################################### | | |||
663 | ################################################### | | |||
664 | | ||||
665 | calligra_drop_product_on_bad_condition( APP_KRITA | | |||
666 | EIGEN3_FOUND "Eigen devel not found" | | |||
667 | EXIV2_FOUND "libexiv2 devel not found" | | |||
668 | HAVE_REQUIRED_LCMS_VERSION "lcms devel not found" | | |||
669 | Boost_SYSTEM_FOUND "boost-system devel not found" | | |||
670 | REQUIRED_Xinput_FOUND "Xinput devel not found " | | |||
671 | ) | | |||
672 | | ||||
673 | ############################################# | | |||
674 | #### Backward compatibility BUILD_x=off #### | | |||
675 | ############################################# | | |||
676 | | ||||
677 | # workaround: disable directly all products which might be activated by internal | | |||
678 | # dependencies, but belong to scope of old flag | | |||
679 | calligra_drop_products_on_old_flag(krita APP_KRITA) | | |||
680 | | ||||
681 | ############################################# | | |||
682 | #### Temporarily broken products #### | | |||
683 | ############################################# | | |||
684 | | ||||
685 | # If a product does not build due to some temporary brokeness disable it here, | | |||
686 | # by calling calligra_disable_product with the product id and the reason, | | |||
687 | # e.g.: | | |||
688 | # calligra_disable_product(APP_KEXI "isn't buildable at the moment") | | |||
689 | | ||||
690 | ############################################# | | |||
691 | #### Calculate buildable products #### | | |||
692 | ############################################# | | |||
693 | | ||||
694 | calligra_drop_unbuildable_products() | | |||
695 | | ||||
696 | ################### | | |||
697 | #################### | | |||
698 | ## Subdirectories ## | | |||
699 | #################### | | |||
700 | ################### | | |||
701 | | ||||
702 | if(SHOULD_BUILD_APP_KRITA) | | |||
703 | add_subdirectory(krita) | | |||
704 | endif() | | |||
705 | 626 | | |||
706 | # non-app directories are moved here because they can depend on SHOULD_BUILD_{appname} variables set above | | |||
707 | add_subdirectory(libs) | 627 | add_subdirectory(libs) | ||
708 | add_subdirectory(plugins) | 628 | add_subdirectory(plugins) | ||
709 | | ||||
710 | add_subdirectory( benchmarks ) | 629 | add_subdirectory(benchmarks) | ||
711 | 630 | add_subdirectory(krita) | |||
712 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) | | |||
713 | | ||||
714 | calligra_product_deps_report("product_deps") | | |||
715 | calligra_log_should_build() | | |||
716 | 631 | | |||
717 | configure_file(KoConfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/KoConfig.h ) | 632 | configure_file(KoConfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/KoConfig.h ) | ||
718 | configure_file(config_convolution.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_convolution.h) | 633 | configure_file(config_convolution.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_convolution.h) | ||
719 | configure_file(config-ocio.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ocio.h ) | 634 | configure_file(config-ocio.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ocio.h ) | ||
720 | 635 | | |||
721 | check_function_exists(powf HAVE_POWF) | 636 | check_function_exists(powf HAVE_POWF) | ||
722 | configure_file(config-powf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-powf.h) | 637 | configure_file(config-powf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-powf.h) | ||
723 | 638 | | |||
724 | 639 | |