@@ -5,8 +5,8 @@ set(CMAKE_CXX_STANDARD 20)
5
5
set (CMAKE_POSITION_INDEPENDENT_CODE ON )
6
6
set (CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
7
7
8
- option (BUILD_PY "Build the python binding of symusic" OFF )
9
- option (BUILD_TEST "Build the test target" OFF )
8
+ option (BUILD_SYMUSIC_PY "Build the python binding of symusic" OFF )
9
+ option (BUILD_SYMUSIC_EXAMPLE "Build the test target" OFF )
10
10
option (ENABLE_LTO "Enables link-time optimization, requires compiler support." ON )
11
11
option (VTUNE "Compile Options for Intel VTune" Off )
12
12
@@ -40,7 +40,7 @@ target_link_libraries(symusic minimidi)
40
40
target_link_libraries (symusic prestosynth)
41
41
target_link_libraries (symusic pyvec)
42
42
43
- if (BUILD_PY )
43
+ if (BUILD_SYMUSIC_PY )
44
44
message ("Building python binding." )
45
45
find_package (Python REQUIRED COMPONENTS Interpreter Development.Module)
46
46
# set symusic target to O3 and release mode because nanobind use minisize
@@ -63,23 +63,20 @@ if(BUILD_PY)
63
63
install (TARGETS abc2midi midi2abc DESTINATION symusic/bin)
64
64
endif ()
65
65
66
- if (BUILD_TEST )
66
+ if (BUILD_SYMUSIC_EXAMPLE )
67
67
add_subdirectory (./3rdparty/nanobench EXCLUDE_FROM_ALL )
68
68
69
- add_executable (note_count tests/note_count.cpp)
70
- add_executable (dump tests/dump.cpp)
71
- add_executable (io_bench tests/io_bench.cpp)
72
- add_executable (synth tests/synth.cpp)
73
- add_executable (sequence tests/sequence.cpp)
74
- add_executable (adjust_time tests/adjust_time.cpp)
69
+ add_executable (note_count examples/cpp/note_count.cpp)
70
+ add_executable (dump examples/cpp/dump.cpp)
71
+ add_executable (io_bench examples/cpp/io_bench.cpp)
72
+ add_executable (synth examples/cpp/synth.cpp)
73
+ add_executable (adjust_time examples/cpp/adjust_time.cpp)
75
74
76
75
target_link_libraries (note_count PRIVATE symusic)
77
76
target_link_libraries (dump PRIVATE symusic)
78
77
target_link_libraries (io_bench PRIVATE symusic nanobench)
79
78
target_link_libraries (synth PUBLIC symusic)
80
- target_link_libraries (sequence PUBLIC symusic)
81
79
target_link_libraries (adjust_time PUBLIC symusic)
82
-
83
80
endif ()
84
81
85
82
if (ENABLE_LTO)
@@ -92,7 +89,7 @@ if (ENABLE_LTO)
92
89
endif ()
93
90
message (STATUS "Link-time optimization (LTO) enabled" )
94
91
set_property (TARGET symusic PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE )
95
- if (BUILD_PY )
92
+ if (BUILD_SYMUSIC_PY )
96
93
set_property (TARGET core PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE )
97
94
endif ()
98
95
else ()
0 commit comments