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 Library_Options for macOS. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Blady-Com
Copy link

Hello, small fix for macOS build, HTH Pascal.

@CLAassistant
Copy link

CLAassistant commented Aug 7, 2018

CLA assistant check
All committers have signed the CLA.

@Blady-Com
Copy link
Author

It seems that Library_Options is only desired by gprbuild for relocatable build and not for static nor static-pic builds, so I made the following changes:

--- ./sqlite/gnatcoll_sqlite.gpr.0	2019-08-15 09:31:09.000000000 +0200
+++ ./sqlite/gnatcoll_sqlite.gpr	2019-08-15 10:08:56.000000000 +0200
@@ -51,20 +51,19 @@
    case Library_Type is
       when "relocatable" =>
          for Library_Interface use ("gnatcoll.sql.sqlite");
+         case OS is
+            when "windows" =>
+               Lib_Opt_Ext := ("-lsqlite3");
+            when "osx" =>
+               Lib_Opt_Ext := ("-lsqlite3");
+            when others =>
+               Thread_Lib := ("-lpthread");
+               Lib_Opt_Ext := ("-lsqlite3") & Thread_Lib;
+         end case;
       when others =>
          null;
    end case;
 
-   case OS is
-      when "windows" =>
-         Lib_Opt_Ext := ("-lsqlite3");
-      when "osx" =>
-         null;
-      when others =>
-         Thread_Lib := ("-lpthread");
-         Lib_Opt_Ext := ("-lsqlite3") & Thread_Lib;
-   end case;
-
    type Sqlite_Dep_Kind is ("embedded", "external");
    Sqlite_Dep : Sqlite_Dep_Kind := External ("GNATCOLL_SQLITE", "embedded");

HTH, Pascal

@t-14 t-14 requested a review from Nikokrock September 27, 2020 15:04
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