Skip to content

Commit

Permalink
HashLink: when building hdlls, use -install_name on macOS
Browse files Browse the repository at this point in the history
This more closely matches official HashLink binaries, and ensures that the hdlls can be found next to a HL/C executable
  • Loading branch information
joshtynjala committed Oct 18, 2023
1 parent 0528e39 commit 21e8e61
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions project/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
</section>

<section if="mac">
<vflag name="-install_name" value="@executable_path/lime.hdll" if="LIME_HASHLINK"/>

<vflag name="-l" value="iconv" />
<vflag name="-framework" value="IOKit" />
Expand Down
10 changes: 10 additions & 0 deletions project/BuildHashlink.xml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@
<ext value=".hdll" />
<files id="ssl" />

<vflag name="-install_name" value="@executable_path/ssl.hdll" if="mac"/>

<lib name="-lhl" unless="windows" />
<lib name="-L${OUTPUT_DIR}/${BINDIR}" unless="windows" />
<lib name="-libpath:${OUTPUT_DIR}/${BINDIR}" if="windows" />
Expand All @@ -397,6 +399,8 @@
<ext value=".hdll" />
<files id="mysql" />

<vflag name="-install_name" value="@executable_path/mysql.hdll" if="mac"/>

<lib name="-lhl" unless="windows" />
<lib name="-L${OUTPUT_DIR}/${BINDIR}" unless="windows" />
<lib name="-libpath:${OUTPUT_DIR}/${BINDIR}" if="windows" />
Expand All @@ -409,6 +413,8 @@
<ext value=".hdll" />
<files id="fmt" />

<vflag name="-install_name" value="@executable_path/fmt.hdll" if="mac"/>

<lib name="-L/usr/local/lib" if="mac" />
<lib name="-L/usr/local/opt/libjpeg-turbo/lib" if="mac" />
<lib name="-L/usr/local/opt/jpeg-turbo/lib" if="mac" />
Expand All @@ -434,6 +440,8 @@
<ext value=".hdll" />
<files id="ui" />

<vflag name="-install_name" value="@executable_path/ui.hdll" if="mac"/>

<lib name="-lhl" unless="windows" />
<lib name="-L${OUTPUT_DIR}/${BINDIR}" unless="windows" />
<section if="windows">
Expand All @@ -450,6 +458,8 @@
<ext value=".hdll" />
<files id="uv" />

<vflag name="-install_name" value="@executable_path/uv.hdll" if="mac"/>

<lib name="-L/usr/local/lib" if="mac" />

<lib name="-luv" unless="windows" />
Expand Down

0 comments on commit 21e8e61

Please sign in to comment.