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

Nuke14.0 changes in Cmake for Windows #102

Open
jonassorgenfrei opened this issue Mar 18, 2023 · 0 comments
Open

Nuke14.0 changes in Cmake for Windows #102

jonassorgenfrei opened this issue Mar 18, 2023 · 0 comments
Assignees

Comments

@jonassorgenfrei
Copy link
Collaborator

jonassorgenfrei commented Mar 18, 2023

Nuke 14.0 changes a little bit the build process for Windows.

We have to add:
target_compile_definitions(${PLUGIN_NAME} PUBLIC NOMINMAX)
target_compile_definitions(${PLUGIN_NAME} PUBLIC _USE_MATH_DEFINES)

# add nuke plugin linked to ddimage lib
function(add_nuke_plugin PLUGIN_NAME)
    add_library(${PLUGIN_NAME} MODULE ${ARGN})
    add_library(NukePlugins::${PLUGIN_NAME} ALIAS ${PLUGIN_NAME})
    target_link_libraries(${PLUGIN_NAME} PRIVATE ${NUKE_DDIMAGE_LIBRARY})
    set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
    if (APPLE)
        set_target_properties(${PLUGIN_NAME} PROPERTIES SUFFIX ".dylib")
    elseif(WIN32)
      target_compile_definitions(${PLUGIN_NAME} PUBLIC NOMINMAX)
      target_compile_definitions(${PLUGIN_NAME} PUBLIC _USE_MATH_DEFINES)
    endif()
endfunction()

It would be cool to use the foundry's add_nuke_plugin instead of ours, i will have a look if we can use it instead!

@jonassorgenfrei jonassorgenfrei self-assigned this Mar 18, 2023
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

No branches or pull requests

1 participant