Closed davidgfnet closed 2 years ago
Thanks. Maybe do this too, though (on top of your patch):
diff -u a/libmikmod/CMakeLists.txt b/libmikmod/CMakeLists.txt
--- a/libmikmod/CMakeLists.txt
+++ b/libmikmod/CMakeLists.txt
@@ -170,6 +170,10 @@
SET (ENABLE_SHARED 1 CACHE BOOL "Whether to build the shared library" )
SET (ENABLE_STATIC 1 CACHE BOOL "Whether to build the static library" )
+if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED)
+ message(FATAL_ERROR "Both static and shared builds got disabled. You must enable at least one of them.")
+endif()
+
### This is to set the RPATH correctly, so when installed
### under a prefix the executables will find the libraries.
### See: http://www.cmake.org/Wiki/CMake_RPATH_handling
Absolutely! Didnt think about this indeed! Thanks for considering the PR, really appreciated!
Thanks, applied.
The cmakefile has a rule to enable/disable static builds, which is awesome! However, in some platforms, might not be even possible to generate a shared object (or at least not trivially). For this, it is helpful to have a knob to disable said build.
This PR adds a knob for this, which is enabled by default thus not changing the default behaviour.