Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
With this commit, MathJax-related files are not copied into `Platform.resourceDir +/+ "HelpSource/lib" when building SuperCollider
  • Loading branch information
prko committed May 15, 2024
1 parent b96732c commit 1834835
Showing 1 changed file with 39 additions and 16 deletions.
55 changes: 39 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ if(MSVC)
set(${flag} "${${flag}} /wd4996") # The POSIX name for this item is deprecated.
endforeach()

# this flag causes MSVC to correctly report __cplusplus, which prevents a compiler error
# caused by some versions of libsndfile's C++ header redefining nullptr as NULL.
# this flag causes MSVC to correctly report __cplusplus, which prevents a compiler error
# caused by some versions of libsndfile's C++ header redefining nullptr as NULL.
# See https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
add_compile_options("/Zc:__cplusplus")

Expand Down Expand Up @@ -578,20 +578,43 @@ endif()
install(FILES ${AdditionalInstallFiles} DESTINATION ${auxresourcesdir})

if(INSTALL_HELP)
if(SC_SYMLINK_CLASSLIB AND APPLE)
message(STATUS "Will create symlink of HelpSource to ${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HelpSource")
if(EXISTS "${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HelpSource")
message(FATAL_ERROR "Symlinking will fail ! HelpSource folder already exists, please delete it first." )
endif()
install( CODE
"EXECUTE_PROCESS(COMMAND ln -shF ${CMAKE_CURRENT_SOURCE_DIR}/HelpSource ${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HelpSource )" )
elseif(NOT APPLE)
install(DIRECTORY HelpSource
DESTINATION ${auxresourcesdir}
PATTERN "*~" EXCLUDE
PATTERN "*#" EXCLUDE
)
endif()
if(SC_SYMLINK_CLASSLIB AND APPLE)
message(STATUS "Will create symlink of HelpSource to ${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HelpSource")
if(EXISTS "${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HelpSource")
message(FATAL_ERROR "Symlinking will fail! HelpSource folder already exists, please delete it first.")
endif()
install(CODE
"EXECUTE_PROCESS(COMMAND ln -shF ${CMAKE_CURRENT_SOURCE_DIR}/HelpSource ${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HelpSource)")
elseif(NOT APPLE)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
# Check if the system is based on Debian
execute_process(
COMMAND cat /proc/version
OUTPUT_VARIABLE SYSTEM_VERSION_INFO
)
# If the system is Debian, exclude the HelpSource/lib/MathLab folder
if("${SYSTEM_VERSION_INFO}" MATCHES "debian")
install(DIRECTORY HelpSource
DESTINATION ${auxresourcesdir}
PATTERN "HelpSource/lib/node_modules/*" EXCLUDE
PATTERN "*~" EXCLUDE
PATTERN "*#" EXCLUDE
)
else()
install(DIRECTORY HelpSource
DESTINATION ${auxresourcesdir}
PATTERN "*~" EXCLUDE
PATTERN "*#" EXCLUDE
)
endif()
else()
install(DIRECTORY HelpSource
DESTINATION ${auxresourcesdir}
PATTERN "*~" EXCLUDE
PATTERN "*#" EXCLUDE
)
endif()
endif()
endif()


Expand Down

0 comments on commit 1834835

Please sign in to comment.