C++

Modern CMake (targets)

Në shqip: CMake modern

ShpjegimiSQ

Në CMake modern, çdo gjë sillet rreth „target-eve“: add_executable dhe add_library i krijojnë, dhe target_link_libraries i lidh. Shmang komandat e vjetra globale si include_directories.

EnglishEN

In modern CMake, everything revolves around “targets”: add_executable and add_library create them, and target_link_libraries connects them. Avoid old global commands like include_directories.

Si ta mendosh

Si diagrami i një fabrike: çdo stacion me hyrjet dhe daljet e veta.

Lexoje në anglisht

Like a factory diagram: each station with its own inputs and outputs.

Shembull kodicmake

add_library(fjalori_core src/kerko.cpp)
target_include_directories(fjalori_core PUBLIC include)
add_executable(fjalori src/main.cpp)
target_link_libraries(fjalori PRIVATE fjalori_core)

Terma të lidhur