From a9063a1b3d8fdf9bb3697c901681e15b3972cf66 Mon Sep 17 00:00:00 2001 From: Kartik Singh Date: Thu, 29 Feb 2024 10:53:53 -0800 Subject: [PATCH] Add base DLL to source files instead of linking on Windows --- src/fasl-lib.lisp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fasl-lib.lisp b/src/fasl-lib.lisp index bf8a82ff..140db296 100644 --- a/src/fasl-lib.lisp +++ b/src/fasl-lib.lisp @@ -138,9 +138,13 @@ library and its header file." :for fasl-filename := (system-fasl-bundle-filename system) :do (format stream "configure_file(${CMAKE_CURRENT_SOURCE_DIR}/~A ${CMAKE_CURRENT_BINARY_DIR}/~A COPYONLY)~%" fasl-filename fasl-filename)) - (format stream "add_library(~A SHARED ~{~A~^ ~})~%" c-name source-filenames) + #+win32 + (format stream "find_file(BASE_LIBRARY NAMES ~A${CMAKE_SHARED_LIBRARY_SUFFIX})~%" *base-library-name*) + (format stream "add_library(~A SHARED ~{~A~^ ~}~@{ ~A~})~%" c-name source-filenames #+win32 "${BASE_LIBRARY}") (format stream "set_target_properties(~A PROPERTIES PREFIX \"\")~%" c-name) - (format stream "find_library(BASE_LIBRARY NAMES ~A${CMAKE_SHARED_LIBRARY_SUFFIX})~%" *base-library-name*) - (format stream "target_link_libraries(~A PRIVATE ${BASE_LIBRARY})~%" c-name) + #-win32 + (progn + (format stream "find_library(BASE_LIBRARY NAMES ~A${CMAKE_SHARED_LIBRARY_SUFFIX})~%" *base-library-name*) + (format stream "target_link_libraries(~A PRIVATE ${BASE_LIBRARY})~%" c-name)) (format stream "install(TARGETS ~A LIBRARY RUNTIME)~%" c-name) (format stream "install(FILES ~A.h TYPE INCLUDE)~%" c-name))))