Skip to content

Commit

Permalink
Add base DLL to source files instead of linking on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-s committed Feb 29, 2024
1 parent 2997515 commit a9063a1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/fasl-lib.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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))))

0 comments on commit a9063a1

Please sign in to comment.