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

Relative directory for libraries #49

Closed
arturadib opened this issue Apr 6, 2012 · 4 comments
Closed

Relative directory for libraries #49

arturadib opened this issue Apr 6, 2012 · 4 comments

Comments

@arturadib
Copy link

It seems like some version since 0.1.3 introduced the (very nice!) feature of keeping temporary files under build/, but it also made it so that we now have to prefix a ../ for libraries.

For example, where my binding.gyp once had:

'conditions': [
        ['OS=="mac"', {
          'include_dirs': [
            'deps/qt-4.8.0/darwin/x64/include',
            'deps/qt-4.8.0/darwin/x64/include/QtCore',
            'deps/qt-4.8.0/darwin/x64/include/QtGui',
            'deps/qt-4.8.0/darwin/x64/include/QtTest'
          ],
          'libraries': [
            'deps/qt-4.8.0/darwin/x64/lib/QtCore.framework/QtCore',
            'deps/qt-4.8.0/darwin/x64/lib/QtGui.framework/QtGui',
            'deps/qt-4.8.0/darwin/x64/lib/QtTest.framework/QtTest'
          ],
        }]

it now needs ../deps in libraries (apparently not in include):

'conditions': [
        ['OS=="mac"', {
          'include_dirs': [
            'deps/qt-4.8.0/darwin/x64/include',
            'deps/qt-4.8.0/darwin/x64/include/QtCore',
            'deps/qt-4.8.0/darwin/x64/include/QtGui',
            'deps/qt-4.8.0/darwin/x64/include/QtTest'
          ],
          'libraries': [
            '../deps/qt-4.8.0/darwin/x64/lib/QtCore.framework/QtCore',
            '../deps/qt-4.8.0/darwin/x64/lib/QtGui.framework/QtGui',
            '../deps/qt-4.8.0/darwin/x64/lib/QtTest.framework/QtTest'
          ],
        }]

The updated source is at http://github.com/arturadib/node-qt

@TooTallNate
Copy link
Contributor

Ya I stumbled upon this as well, and basically it's a gyp bug where it's not "relativizing" properly. I added the module_root_dir variable for this reason. See: https://github.com/rbranson/node-ffi/blob/master/binding.gyp#L18

@arturadib
Copy link
Author

Hmm that helps, but I can see users getting confused as to when do
they need the variable -- for example in the file you quoted, some
places need the variable, some don't. Hard to know when...

Is there a gyp parameter that lets us specify the project root or something?

@TooTallNate
Copy link
Contributor

Is there a gyp parameter that lets us specify the project root or something?

Not that I know of.

And I agree, it's not ideal. It's just a workaround to a gyp bug (I have notified them). Though you should be able to just always use the variable, even on include_dirs. That would take care of the inconsistency.

@akmumu
Copy link

akmumu commented Mar 25, 2014

i have the same problem libraries can not,but others can

targos pushed a commit to targos/node-gyp that referenced this issue Aug 22, 2021
* build: support apple silicon (arm64 darwin) builds

* Update CHANGELOG.md
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

3 participants