1 if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/nova-simd/vec.hpp)
2 message(FATAL_ERROR "nova-simd submodule is missing: please run `git submodule init && git submodule update' from the toplevel of your git working tree")
6 aux_source_directory(boost/libs/thread/src/ boost_thread_src )
8 include_directories(boost)
11 aux_source_directory(boost/libs/thread/src/win32/ boost_thread_platform )
12 add_definitions(-DBOOST_THREAD_BUILD_DLL)
13 elseif(PTHREADS_FOUND)
14 aux_source_directory(boost/libs/thread/src/pthread/ boost_thread_platform )
16 message(SEND_ERROR "we need to implement boost_thread")
19 include_directories(${PTHREADS_INCLUDE_DIR})
22 aux_source_directory(boost/libs/program_options/src/ boost_program_options )
23 add_library(boost_program_options STATIC ${boost_program_options})
25 aux_source_directory(boost/libs/system/src/ boost_system )
26 add_library(boost_system STATIC ${boost_system})
28 aux_source_directory(boost/libs/filesystem/v3/src boost_filesystem_v3)
29 add_library(boost_filesystem STATIC ${boost_filesystem_v2} ${boost_filesystem_v3})
33 add_library(oscpack STATIC "oscpack_build.cpp")
36 add_library(tlsf STATIC "TLSF-2.4.6/src/tlsf.c")
37 set_target_properties(tlsf
38 PROPERTIES COMPILE_DEFINITIONS TLSF_STATISTIC=1)
42 set_property(TARGET boost_program_options boost_system boost_filesystem oscpack tlsf
43 APPEND PROPERTY COMPILE_FLAGS "-flto -flto-report")
45 set_property(TARGET boost_program_options boost_system boost_filesystem oscpack tlsf
46 APPEND PROPERTY LINK_FLAGS "-flto -flto-report")
50 if (${DSO_VISIBILITY})
51 remove_definitions(-fvisibility=hidden)
54 add_library(boost_thread STATIC ${boost_thread_src} ${boost_thread_platform})
56 add_library(supercollider_boost_thread SHARED ${boost_thread_src} ${boost_thread_platform})
57 target_link_libraries(supercollider_boost_thread ${PTHREADS_LIBRARY})
60 set_property(TARGET boost_thread supercollider_boost_thread
61 APPEND PROPERTY COMPILE_FLAGS "-flto -flto-report")
63 set_property(TARGET boost_thread supercollider_boost_thread
64 APPEND PROPERTY LINK_FLAGS "-flto -flto-report")
69 include (${CMAKE_SOURCE_DIR}/cmake_modules/MacAppFolder.cmake)
70 install(TARGETS supercollider_boost_thread
71 LIBRARY DESTINATION "${scappauxresourcesdir}/../MacOS"
72 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
74 install(TARGETS supercollider_boost_thread
75 DESTINATION "SuperCollider"
76 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
78 install(TARGETS supercollider_boost_thread
79 LIBRARY DESTINATION "lib"
80 RUNTIME DESTINATION "bin"
81 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)