Skip to content

Commit

Permalink
Add cmake option NO_GPL3 to simplify building of GPL2 binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
danstowell committed Dec 27, 2012
1 parent e65782b commit e2cd504
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Expand Up @@ -165,8 +165,8 @@ option(SC_MEMORY_DEBUGGING "Build sclang&scsynth for memory debugging (disable m
option(GC_SANITYCHECK "Enable sanity checks in the sclang garbage collector.")

option(NO_LIBSNDFILE "Disable soundfile functionality. (Not recommended.)" OFF)

option(NO_AVAHI "Disable Avahi support. (Not recommended.)" OFF)
option(NO_GPL3 "Disable GPL3 code, for pure-GPL2 situations. (Not recommended.)" OFF)

option(SCLANG_SERVER "Build with internal server." ON)

Expand Down Expand Up @@ -287,6 +287,10 @@ if(MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign")
endif()

if (NO_GPL3)
add_definitions(-DNO_GPL3)
endif()

#############################################
# subdirectories
add_subdirectory(external_libraries)
Expand Down
12 changes: 10 additions & 2 deletions editors/CMakeLists.txt
Expand Up @@ -19,10 +19,18 @@ if(SC_EL)
endif()

if(SC_ED)
add_subdirectory(sced)
if(NO_GPL3)
message(WARNING "SC_ED requested, but NO_GPL3 flag is on, so not activated.")
else()
add_subdirectory(sced)
endif()
endif()

if(SC_VIM)
add_subdirectory(scvim)
if(NO_GPL3)
message(WARNING "SC_VIM requested, but NO_GPL3 flag is on, so not activated.")
else()
add_subdirectory(scvim)
endif()
endif()

0 comments on commit e2cd504

Please sign in to comment.