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