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

Monolithic pxr headers not installed correctly #277

Closed
jcowles opened this issue Sep 7, 2017 · 7 comments
Closed

Monolithic pxr headers not installed correctly #277

jcowles opened this issue Sep 7, 2017 · 7 comments

Comments

@jcowles
Copy link

jcowles commented Sep 7, 2017

Description of Issue

After a successful build, I have no headers in my build/include/pxr directory other than pxr.h

Steps to Reproduce

python build_scripts\build_usd.py --build-monolithic --no-ptex --no-alembic build_monolithic\

After successful build, I have other headers, but the pxr headers are missing (aside from pxr.h).

System Information (OS, Hardware)

Windows

@jtran56
Copy link

jtran56 commented Sep 7, 2017

Filed as internal issue #150565.

@jcowles
Copy link
Author

jcowles commented Oct 16, 2017

Still broken with release 0.8.1

@giuliom95
Copy link

Same issue on CentOS 7 with USD 0.8.1.
I've built it by launching "python build_scripts/build_usd.py --build-monolithic --ptex install/"

@ix-dcourtois
Copy link
Contributor

Hi, this is happening also on Windows when manually building using CMake (with -DPXR_BUILD_MONOLITHIC=On)

@ix-dcourtois
Copy link
Contributor

ix-dcourtois commented Dec 7, 2017

Hi again,

I'm not sure it's the right place for this, but I have a quick fix for this problem.
In the _copy_headers function (Private.cmake) I set a target property to store the headers in the target:

    set_target_properties(${LIBRARY_NAME}_headerfiles
        PROPERTIES
            FOLDER "headerfiles"
            INSTALL_HEADERS "${files_copied}"           # this line is the new one
    )

and in the same file, near the end of the _pxr_library function, I do this :

    if(NOT isObject)
        # the usual code...

    elseif(PXR_BUILD_MONOLITHIC)
        # this elseif is what installs the headers. Problem was when monolithic build is
        # selected, every target is built as an object, so the previous code was never called
        get_target_property(install_headers ${NAME}_headerfiles INSTALL_HEADERS)
        if(install_headers)
            install(FILES ${install_headers} DESTINATION ${headerInstallPrefix})
        endif()
    endif()

@sunyab
Copy link
Contributor

sunyab commented Jan 3, 2018

Thanks for the tip @ix-dcourtois! I tweaked your fix a bit to ensure that only public headers would be installed.

@dcourtois
Copy link

@sunyab Yep I noticed the commit, glad I could be of help :)

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

6 participants