From d703eb5231f74932e01673f14859fc3044f91cd4 Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 18 Jul 2024 09:58:39 +0200 Subject: [PATCH] fixes: added cocoa linker options --- components/chmhelp/lhelp/Makefile | 3 +++ components/chmhelp/lhelp/Makefile.fpc | 4 ++++ ide/Makefile | 9 ++++++--- ide/Makefile.fpc | 10 ++++++---- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/components/chmhelp/lhelp/Makefile b/components/chmhelp/lhelp/Makefile index 9aac47a235..e692bb0fc9 100644 --- a/components/chmhelp/lhelp/Makefile +++ b/components/chmhelp/lhelp/Makefile @@ -385,6 +385,9 @@ endif endif endif export LCL_PLATFORM +ifeq ($(LCL_PLATFORM),cocoa) +LHELP_OPT+=-k-framework -kCocoa -k-weak_framework -kUserNotifications +endif ifneq ($(findstring $(OS_TARGET),win32 win64),) LHELP_OPT+= -WG endif diff --git a/components/chmhelp/lhelp/Makefile.fpc b/components/chmhelp/lhelp/Makefile.fpc index 766edb2f1b..d727ba4349 100644 --- a/components/chmhelp/lhelp/Makefile.fpc +++ b/components/chmhelp/lhelp/Makefile.fpc @@ -49,6 +49,10 @@ endif endif export LCL_PLATFORM +ifeq ($(LCL_PLATFORM),cocoa) +LHELP_OPT+=-k-framework -kCocoa -k-weak_framework -kUserNotifications +endif + # apptype gui ifneq ($(findstring $(OS_TARGET),win32 win64),) LHELP_OPT+= -WG diff --git a/ide/Makefile b/ide/Makefile index 6377f2280c..2ff01af8da 100644 --- a/ide/Makefile +++ b/ide/Makefile @@ -388,7 +388,10 @@ ifeq ($(OS_TARGET),darwin) DBG_OPTIONS=-gw endif LAZARUS_OPT=$(LAZARUS_LIBPATHS) -DEFAULT_IDE_OPTIONS= $(LAZARUS_LIBPATHS) \ +ifeq ($(LCL_PLATFORM),cocoa) +LAZARUS_OPT+=-k-framework -kCocoa -k-weak_framework -kUserNotifications +endif +DEFAULT_IDE_OPTIONS= \ -Fu../packager/units/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/debuggerintf/lib/$(CPU_TARGET)-$(OS_TARGET) \ @@ -4801,11 +4804,11 @@ ide: $(COMPILER_UNITTARGETDIR) revisioninc $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(DEFAULT_IDE_OPTIONS) $(LAZARUS_OPT) $(OPT)' bigide: $(COMPILER_UNITTARGETDIR) revisioninc -$(DEL) $(COMPILER_UNITTARGETDIR)/pkgmanager$(PPUEXT) - $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(OPT) $(BIG_IDE_OPTIONS)' + $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(BIG_IDE_OPTIONS) $(LAZARUS_OPT) $(OPT)' starter: $(COMPILER_UNITTARGETDIR) $(MAKE) --assume-new=startlazarus.lpr startlazarus$(EXEEXT) OPT='$(DEFAULT_IDE_OPTIONS) $(LAZARUS_OPT) $(OPT)' lazbuilder: $(COMPILER_UNITTARGETDIR) - $(MAKE) --assume-new=lazbuild.lpr lazbuild$(EXEEXT) OPT='$(DEFAULT_IDE_OPTIONS) $(OPT)' + $(MAKE) --assume-new=lazbuild.lpr lazbuild$(EXEEXT) OPT='$(DEFAULT_IDE_OPTIONS) $(LAZBUILD_OPT) $(OPT)' all: ide starter lazbuilder cleanide: -$(DEL) $(wildcard *$(OEXT)) diff --git a/ide/Makefile.fpc b/ide/Makefile.fpc index 9275b2b26c..94052bc8f7 100644 --- a/ide/Makefile.fpc +++ b/ide/Makefile.fpc @@ -78,12 +78,14 @@ DBG_OPTIONS=-gw endif # -# idemake.cfg LAZARUS_OPT=$(LAZARUS_LIBPATHS) +ifeq ($(LCL_PLATFORM),cocoa) +LAZARUS_OPT+=-k-framework -kCocoa -k-weak_framework -kUserNotifications +endif # # Options to compile an IDE without extra packages -DEFAULT_IDE_OPTIONS= $(LAZARUS_LIBPATHS) \ +DEFAULT_IDE_OPTIONS= \ -Fu../packager/units/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/debuggerintf/lib/$(CPU_TARGET)-$(OS_TARGET) \ @@ -185,7 +187,7 @@ ide: $(COMPILER_UNITTARGETDIR) revisioninc # compile IDE with some extra packages bigide: $(COMPILER_UNITTARGETDIR) revisioninc -$(DEL) $(COMPILER_UNITTARGETDIR)/pkgmanager$(PPUEXT) - $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(OPT) $(BIG_IDE_OPTIONS)' + $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(BIG_IDE_OPTIONS) $(LAZARUS_OPT) $(OPT)' #----------------------------------------------------------------------------- starter: $(COMPILER_UNITTARGETDIR) @@ -193,7 +195,7 @@ starter: $(COMPILER_UNITTARGETDIR) #----------------------------------------------------------------------------- lazbuilder: $(COMPILER_UNITTARGETDIR) - $(MAKE) --assume-new=lazbuild.lpr lazbuild$(EXEEXT) OPT='$(DEFAULT_IDE_OPTIONS) $(OPT)' + $(MAKE) --assume-new=lazbuild.lpr lazbuild$(EXEEXT) OPT='$(DEFAULT_IDE_OPTIONS) $(LAZBUILD_OPT) $(OPT)' #----------------------------------------------------------------------------- all: ide starter lazbuilder