You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.0 KiB
CMake
56 lines
2.0 KiB
CMake
####### original SC Cmake file starts here
|
|
cmake_minimum_required(VERSION 3.3)
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
# get_filename_component(PROJECT ${CMAKE_SOURCE_DIR} NAME_WE) #automatically sets project name from the filename
|
|
# message(STATUS "Project name is ${PROJECT}")
|
|
# project (${PROJECT})
|
|
|
|
project (fluid_decomposition_supercollider LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
|
|
|
|
|
|
option(SUPERNOVA "Build plugins for supernova" OFF)
|
|
|
|
|
|
MACRO(SUBDIRLIST result curdir)
|
|
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
|
|
SET(dirlist "")
|
|
FOREACH(child ${children})
|
|
IF(IS_DIRECTORY ${curdir}/${child})
|
|
LIST(APPEND dirlist ${child})
|
|
ENDIF()
|
|
ENDFOREACH()
|
|
SET(${result} ${dirlist})
|
|
ENDMACRO()
|
|
|
|
get_filename_component(FLUIDPATH ${FLUID_DECOMP_PATH} ABSOLUTE)
|
|
message(${FLUIDPATH})
|
|
# if (NOT DEFINED ${FLUID_DECOMP_PATH})
|
|
# message(FATAL_ERROR "Please set the path to the fluid_decomposition sources with -DFLUID_DECOMP_PATH=<path>")
|
|
# endif()
|
|
|
|
if (NOT (EXISTS "${FLUIDPATH}/build/fluid_decomposition-exports.cmake"))
|
|
message(FATAL_ERROR "Can't find the fluid_decomposition CMake targets file at ${FLUIDPATH}/build/fluid_decomposition-expors.cmake. Please go to ${FLUIDPATH}/build and run CMake")
|
|
endif()
|
|
|
|
include("${FLUIDPATH}/build/fluid_decomposition-exports.cmake")
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/release-packaging/plugins")
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
|
|
|
|
set(CMAKE_SHARED_MODULE_PREFIX "")
|
|
if(APPLE OR WIN32)
|
|
set(CMAKE_SHARED_MODULE_SUFFIX ".scx")
|
|
endif()
|
|
|
|
SUBDIRLIST(PROJECT_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
|
foreach (project_dir ${PROJECT_DIRS})
|
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/${project_dir}/CMakeLists.txt")
|
|
message("Generating: ${project_dir}")
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/${project_dir})
|
|
endif ()
|
|
endforeach ()
|