Add GHC_DYNAMIC cmake option - allows building dynamically-linked haskell object files and executables (needed for some distributions)
authorS.D.
Fri, 23 Sep 2022 02:45:49 +0300
changeset 15898 1878d95d6e15
parent 15897 d7b53d08ad9c
child 15899 6cb7330113d8
Add GHC_DYNAMIC cmake option - allows building dynamically-linked haskell object files and executables (needed for some distributions)
CMakeLists.txt
INSTALL.md
--- a/CMakeLists.txt	Fri Sep 23 02:21:21 2022 +0300
+++ b/CMakeLists.txt	Fri Sep 23 02:45:49 2022 +0300
@@ -165,6 +165,10 @@
 endif()
 
 
+if(GHC_DYNAMIC)
+  list(APPEND haskell_flags "-dynamic")
+endif()
+
 #get BUILD_TYPE and enable/disable optimisation
 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
 if(CMAKE_BUILD_TYPE STREQUAL "Debug")
--- a/INSTALL.md	Fri Sep 23 02:21:21 2022 +0300
+++ b/INSTALL.md	Fri Sep 23 02:45:49 2022 +0300
@@ -118,6 +118,7 @@
 - `CMAKE_INSTALL_PREFIX`: Installation directory
 - `NOSERVER`: Set to `ON` to *not* build the server
 - `NOVIDEOREC`: Set to `ON` to *not* build the video recorder
+- `GHC_DYNAMIC`: Set to `ON` to build dynamically-linked haskell object files and executables (needed for some distributions)
 
 ### Step 2: Make