Browse Source
More cmake updates
More cmake updates
Uses system libraries by default with a fallback to local Adds the Wrapper build on OSX Adds mod_script_pipe Adds ffmpeg Some additional cleanupau-ny-api
28 changed files with 339 additions and 165 deletions
-
46CMakeLists.txt
-
185cmake-proxies/CMakeLists.txt
-
6cmake-proxies/FileDialog/CMakeLists.txt
-
2cmake-proxies/cmake-modules/MacOSXBundleInfo.plist.in
-
2cmake-proxies/expat/CMakeLists.txt
-
65cmake-proxies/ffmpeg/CMakeLists.txt
-
2cmake-proxies/lame/CMakeLists.txt
-
3cmake-proxies/lib-widget-extra/CMakeLists.txt
-
1cmake-proxies/libid3tag/CMakeLists.txt
-
1cmake-proxies/libmad/CMakeLists.txt
-
1cmake-proxies/libnyquist/CMakeLists.txt
-
3cmake-proxies/libogg/CMakeLists.txt
-
3cmake-proxies/libscorealign/CMakeLists.txt
-
2cmake-proxies/libsndfile/CMakeLists.txt
-
2cmake-proxies/libsoxr/CMakeLists.txt
-
4cmake-proxies/libvamp/CMakeLists.txt
-
4cmake-proxies/libvorbis/CMakeLists.txt
-
14cmake-proxies/lv2/CMakeLists.txt
-
56cmake-proxies/mod-script-pipe/CMakeLists.txt
-
2cmake-proxies/portaudio-v19/CMakeLists.txt
-
2cmake-proxies/portmidi/CMakeLists.txt
-
2cmake-proxies/portmixer/CMakeLists.txt
-
4cmake-proxies/portsmf/CMakeLists.txt
-
3cmake-proxies/sbsms/CMakeLists.txt
-
3cmake-proxies/soundtouch/CMakeLists.txt
-
2cmake-proxies/twolame/CMakeLists.txt
-
18cmake-proxies/wxwidgets/CMakeLists.txt
-
66src/CMakeLists.txt
@ -1,19 +1,54 @@ |
|||
#directory cmake-proxies/expat |
|||
set( TARGET expat ) |
|||
set( TARGET_SOURCE ${LIB_SRC_DIRECTORY}${TARGET} ) |
|||
project( ${TARGET} ) |
|||
|
|||
set( SOURCES |
|||
${TARGET_SOURCE}/lib/xmlparse.c |
|||
#${LIB_SRC_DIRECTORY}FileDialog/gtk/FileDialogPrivate.cpp #not on windows. |
|||
#${LIB_SRC_DIRECTORY}${TARGET}/win/FileDialogPrivate.cpp |
|||
) |
|||
# This defines the #define on both Windows and Linux. |
|||
add_definitions( ) |
|||
add_library( ${TARGET} MODULE ${SOURCES}) |
|||
# Add our target and all of it's aliases |
|||
add_library( ${TARGET} INTERFACE ) |
|||
add_library( libavcodec ALIAS ${TARGET} ) |
|||
add_library( libavformat ALIAS ${TARGET} ) |
|||
add_library( libavutil ALIAS ${TARGET} ) |
|||
|
|||
target_include_directories( ${TARGET} PRIVATE |
|||
# Pull in standard variables |
|||
def_vars() |
|||
|
|||
) |
|||
message( STATUS "========== Configuring ${TARGET} ==========" ) |
|||
|
|||
# Let the Audacity target know we're using ffmpeg |
|||
set( USE_FFMPEG ON CACHE INTERNAL USE_FFMPEG ) |
|||
|
|||
# Add the system/local option |
|||
option( use_system_${TARGET} "Use ${TARGET} system library if available" ${prefer_system_libs} ) |
|||
|
|||
# Look up the system packages if the user wants them |
|||
if( use_system_${TARGET} ) |
|||
# Provide an option that determines if the libraries are loaded |
|||
# dynamically at run time or statically link to at build time |
|||
option( disable_dynamic_loading "Disable dynamic loading of ${TARGET} libraries" NO) |
|||
|
|||
# Look them up |
|||
pkg_check_modules( ${TARGET} ${packages} ) |
|||
else() |
|||
# Make sure to reset in case user reconfigures between local/system |
|||
set( disable_dynamic_loading NO CACHE INTERNAL "" ) |
|||
endif() |
|||
|
|||
# If the system packages were found |
|||
if( ${TARGET}_FOUND ) |
|||
message( STATUS "Using '${TARGET}' system library" ) |
|||
|
|||
# Pull in the package settings |
|||
get_package_interface( ${TARGET} ) |
|||
else() |
|||
message( STATUS "Using '${TARGET}' local library" ) |
|||
|
|||
# Otherwise define the local settings |
|||
list( APPEND INCLUDES |
|||
INTERFACE |
|||
${TARGET_ROOT} |
|||
) |
|||
endif() |
|||
|
|||
# And add the settings to the target |
|||
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} ) |
|||
target_compile_options( ${TARGET} INTERFACE ${CFLAGS} ) |
|||
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} ) |
|||
target_link_options( ${TARGET} INTERFACE ${LDFLAGS} ) |
|||
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} ) |
|||
|
|||
target_link_libraries( ${TARGET} ) |
@ -1,20 +1,46 @@ |
|||
#directory cmake-proxies/mod-script-pipe |
|||
|
|||
set( TARGET mod-script-pipe ) |
|||
set( TARGET_SOURCE ${LIB_SRC_DIRECTORY}${TARGET} ) |
|||
project( ${TARGET} ) |
|||
find_package(wxWidgets REQUIRED COMPONENTS net core base) |
|||
include(${wxWidgets_USE_FILE}) |
|||
|
|||
set( SOURCES |
|||
${TARGET_SOURCE}/PipeServer.cpp |
|||
${TARGET_SOURCE}/ScripterCallback.cpp |
|||
set( TARGET_ROOT "${libsrc}/${TARGET}" ) |
|||
|
|||
message( STATUS "========== Configuring ${TARGET} ==========" ) |
|||
|
|||
def_vars() |
|||
|
|||
add_library( ${TARGET} MODULE ) |
|||
|
|||
list( APPEND SOURCES |
|||
PRIVATE |
|||
${TARGET_ROOT}/PipeServer.cpp |
|||
${TARGET_ROOT}/ScripterCallback.cpp |
|||
) |
|||
|
|||
list( APPEND INCLUDES |
|||
PUBLIC |
|||
${TARGET_ROOT} |
|||
) |
|||
|
|||
list( APPEND DEFINES |
|||
PRIVATE |
|||
BUILDING_SCRIPT_PIPE |
|||
) |
|||
# This defines the #define on both Windows and Linux. |
|||
add_definitions( -DBUILDING_SCRIPT_PIPE ) |
|||
add_library( ${TARGET} MODULE ${SOURCES}) |
|||
|
|||
target_include_directories( ${TARGET} PRIVATE |
|||
${top_dir}/win |
|||
list( APPEND LIBRARIES |
|||
PRIVATE |
|||
wxwidgets |
|||
Audacity |
|||
) |
|||
|
|||
target_link_libraries( ${TARGET} ${wxWidgets_LIBRARIES}) |
|||
set_target_properties( ${TARGET} |
|||
PROPERTIES |
|||
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_MODDIR}" |
|||
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_MODDIR}" |
|||
LIBRARY_OUTPUT_DIRECTORY "${_MODDIR}" |
|||
PREFIX "" |
|||
) |
|||
|
|||
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" ) |
|||
target_sources( ${TARGET} PRIVATE ${SOURCES} ) |
|||
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} ) |
|||
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} ) |
|||
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} ) |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue