Comments (4)
@gammasoft71 cpm.cmake is pretty neat. I'll give your suggestion a try though - thanks!
from xtd.
Hi,
First of all, thank you for your interest in xtd.
xtd does not yet have package management, see #221. This may explain your problem.
I don't know cpm.cmake
. Maybe adding find_package
can be a solution. But I think the best way to do this is to start with a minimal project and for example not to use the xtd.cmake
specific commands but the standard cmake commands.
Creates a project too simple like this and try it with cpm.cmake
.
- my_app.cpp
#include <xtd/xtd>
auto main()->int {
xtd::forms::application::run(xtd::forms::form::create("My app"));
}
- CMakeLists.txt :
cmake_minimum_required(VERSION 3.20)
project(my_app)
find_package(xtd REQUIRED)
add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE my_app.cpp)
target_link_libraries(${PROJECT_NAME} xtd)
After that, if it works, add specific commands to xtd.cmake like add_sources
, add_resources
, target_type
...
and see what happens.
I hope this helps.
from xtd.
@gammasoft71 Update: I tried it and it didn't work. It still complained about CMake trying to override my project (saying that, e.g., target_xxx_xxx()
(like target_link_libraries
) was already called on my CMake project). Essentially what I'm trying to do is download and build xtd alongside my project instead of forcing people to install it separately.
from xtd.
Sorry this is not working. I don't have enough information to help you.
I think the problem may be that xtd doesn't have package management #221 yet.
Apart from that, I really don't see how xtd's cmake management could be blocking.
The cmake commands added by xtd only set variables to prepare the work of the target_type
command.
And it's only when target_type
is called that it has specific processing for xtd (such as managing resources, languages and settings).
And if you use standard cmake commands, xtd does nothing...
Stupid question: have you ever tried the same operation with a library as complex as xtd, such as fltk, wxwidgets, or other ?
from xtd.
Related Issues (20)
- [BUG] Build failed with XTD_BUILD_LIBRARIES_XTD_DRAWING=OFF HOT 8
- [BUG] xld - Fix build on gcc-13
- [BUG] xtd - Fix build on Xcode 14.x
- [BUG] xtd - Fix build on Visual Studio 2022
- [ENHANCEMENT] xtd - Deactivate by default the option to convert warnings into errors during build.
- [BUG] Unable to compiling on Linux/GCC with Meson and CMake module HOT 2
- [BUG] - Build with C++17 standard failed HOT 1
- [FEATURE] Adding Python binding HOT 1
- [FEATURE] Adding Lua binding HOT 1
- [QUESTION] Please enable Github discussion HOT 1
- [QUESTION] How to redraw window background or button redraw? HOT 2
- [QUESTION] troubles when installing/compiling xtd HOT 2
- [BUG] Unable to build xtd.forms project HOT 1
- [ENHANCEMENT] xtd - FreeBSD support HOT 12
- [BUG] xtdc-gui.exe not found HOT 9
- [QUESTION] Code autosuggestion (IntelliSense) in VS2022 HOT 9
- [ENHANCEMENT] xtd.forms - vulkan widget HOT 1
- [BUG] fatal error: alsa/asoundlib.h: No such file or directory HOT 8
- [ENHANCEMENT] xtd - Remove deprecated items
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xtd.