forked from Cycling74/max-mxj
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
59 lines (46 loc) · 1.78 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required(VERSION 3.0)
if (APPLE)
message(STATUS "Building mxj.mxo")
execute_process(
COMMAND xcodebuild -project mxj.xcodeproj
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/source/mxj"
)
message(STATUS "Building mxj~.mxo")
execute_process(
COMMAND xcodebuild -project mxj~.xcodeproj
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/source/mxj"
)
else ()
set (MSBUILD "C:\\Program Files (x86)\\MSBuild\\12.0\\Bin\\MSBuild.exe")
message(STATUS "Building mxj 64")
execute_process(
COMMAND "${MSBUILD}" /target:rebuild /p:Platform=x64 mxj.vcxproj
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/source/mxj"
)
message(STATUS "Building mxj~ 64")
execute_process(
COMMAND "${MSBUILD}" /target:rebuild /p:Platform=x64 mxj~.vcxproj
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/source/mxj"
)
endif ()
if (APPLE)
######################################################################
message(STATUS "NOW WORKING ON THE SAFE WRAPPERS")
######################################################################
# Fetch the correct verion of the max-api
message(STATUS "Updating Git Submodules")
execute_process(
COMMAND git submodule update --init --recursive
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
# Misc setup and subroutines
include(${CMAKE_CURRENT_SOURCE_DIR}/source/max-api/script/max-package.cmake)
# Generate a project for every folder in the "source/projects" folder
SUBDIRLIST(PROJECT_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/source/projects)
foreach (project_dir ${PROJECT_DIRS})
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/source/projects/${project_dir}/CMakeLists.txt")
message("Generating: ${project_dir}")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/source/projects/${project_dir})
endif ()
endforeach ()
endif() # APPLE