Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile definition in CMakeLists for static library #418

Merged
merged 2 commits into from
Oct 13, 2024

Conversation

RealXuChe
Copy link
Contributor

Closes #409

With this PR, I'm able to add static CMake target nodeeditor as a dependency of my project.

I've tested to build it static, but not tested to build it shared. I can test it if you want.

I'm using the following CMake command:

FetchContent_Declare(
        NodeEditor2
        GIT_REPOSITORY https://github.com/RealXuChe/nodeeditor.git
        GIT_TAG 2.2.5
)
FUNCTION( NE2_MakeAvailable )
    set(BUILD_TESTING OFF)
    set(BUILD_EXAMPLES OFF)
    set(BUILD_SHARED_LIBS OFF)
    set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
    FetchContent_MakeAvailable(NodeEditor2)
ENDFUNCTION ()
NE2_MakeAvailable()

Also, maybe I can include this CMake code snippet into the README.md, so people can directly include this library into their project, without building and even installing it in advance?

@RealXuChe
Copy link
Contributor Author

OK, this still has some bugs, it doesn't work well on Windows, now testing and investigating it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants