Browse Source

Add SDL-Dynamic to conditionally dynamic link

master
Macoy Madson 9 months ago
parent
commit
912f38bbd0
  1. 14
      src/SDL.cake

14
src/SDL.cake

@ -333,14 +333,16 @@ Note that you can also build SDL manually. This can be useful if you are porting
(add-library-search-directory "Dependencies/SDL/VisualC/x64/Debug")
(add-static-link-objects "SDL2main.lib" "SDL2.lib"))
;; (add-library-runtime-search-directory "Dependencies/SDL/VisualC/x64/Debug" "."))
;; ('Unix ;; Dynamic link
;; (add-library-search-directory "cakelisp_cache/SDLInstallDir/lib")
;; (add-library-dependency "SDL2")
;; ;; TODO: Relative path is going to break for sure
;; (add-library-runtime-search-directory "cakelisp_cache/SDLInstallDir/lib" "."))
('Unix ;; Static link
(add-compiler-link-options "-pthread")
(add-static-link-objects "cakelisp_cache/SDLInstallDir/lib/libSDL2.a")))
(comptime-cond
('SDL-Dynamic
(add-library-search-directory "cakelisp_cache/SDLInstallDir/lib")
(add-library-dependency "SDL2")
;; TODO: Relative path is going to break for sure
(add-library-runtime-search-directory "cakelisp_cache/SDLInstallDir/lib" "."))
(true
(add-static-link-objects "cakelisp_cache/SDLInstallDir/lib/libSDL2.a")))))
(comptime-cond
('Windows ;; DLLs need to be in the same directory as the executable

Loading…
Cancel
Save