GithubHelp home page GithubHelp logo

How to build without CMake ? about td HOT 3 CLOSED

tdlib avatar tdlib commented on April 30, 2024
How to build without CMake ?

from td.

Comments (3)

levlam avatar levlam commented on April 30, 2024

The best way to answer all questions is to read CMakeLists.txt files.

  1. CMakeLists.txt files contains exhaustive description of all source code dependencies. If I try to write them here, I just write CMakeLists.txt from scratch.
  2. Section "https://github.com/tdlib/td#using-in-cmake-c-projects" of README.md contains list of targets supposed to be externally used. Choose one and follow its dependencies.
  3. It looks like you need Td::TdStatic target.
  4. Follow install target described in CMakeLists.txt.
  5. Yes. Some source code files are auto-generated. Follow prepare_cross_compiling CMake target to see, how they are generated.
  6. You don't need to exclude anything manually. All unneeded OSes specific code (which is localized in tdutils/td/utils/port) will be excluded automatically.

Anyway, I recommend to use CMake, even your project uses another build system, because it will be hard to maintain your own build files. Just specify CMAKE_INSTALL_PREFIX to CMake, compile and install TDLib to local directory, and use prebuilt library in your project.

from td.

thebootroo avatar thebootroo commented on April 30, 2024

I understand but I really don't want to build full lib with Cmake, it takes ages (more than 30 min on my very decent machine), and produces a lot of things which I don't need/use. Also using prebuild lib will complicate the build steps and deploy, and source management. On one of my target systems, I'm not even sure to have Cmake available to prebuild lib once.

I'll try to create my Qbs file by extracting information from Cmake for the TdStatic target.

from td.

arseny30 avatar arseny30 commented on April 30, 2024

Just a fair warning: do not expect compilation time to be decreased after migration to Qbs.
To build TdStatic means to build almost everything.

Also the build should be much faster than 30min when you are using clang and parallel build with make or ninja.

from td.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.