Skip to content

Commit

Permalink
Add sanity check for shared/static flags
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgfnet authored and sezero committed Dec 7, 2021
1 parent 2d58339 commit 65efd9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libmikmod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ SET (ENABLE_RPATH 1 CACHE BOOL "Whether to use an rpath when linking" )
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
Expand Down

0 comments on commit 65efd9e

Please sign in to comment.