diff --git a/CMakeLists.txt b/CMakeLists.txt index f3357c4e4..b0e6db9d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,10 +35,6 @@ if( "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}" ) ) endif() -# Just a couple of convenience variables -set( topdir "${CMAKE_SOURCE_DIR}" ) -set( libsrc "${topdir}/lib-src" ) - # Default build type is Debug if( NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES ) set( CMAKE_BUILD_TYPE "Debug" ) diff --git a/cmake-proxies/cmake-modules/AudacityFunctions.cmake b/cmake-proxies/cmake-modules/AudacityFunctions.cmake index 7284fd359..73b6fd702 100644 --- a/cmake-proxies/cmake-modules/AudacityFunctions.cmake +++ b/cmake-proxies/cmake-modules/AudacityFunctions.cmake @@ -586,7 +586,7 @@ function( addlib dir name symbol required check ) # Define target's name and it's source directory set( TARGET ${dir} ) - set( TARGET_ROOT ${libsrc}/${dir} ) + set( TARGET_ROOT ${CMAKE_SOURCE_DIR}/lib-src/${dir} ) # Define the option name set( use ${_OPT}use_${name} ) diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt index b441b7c1b..f56f28ec7 100755 --- a/help/CMakeLists.txt +++ b/help/CMakeLists.txt @@ -1,5 +1,5 @@ set( TARGET manual ) -set( TARGET_ROOT ${topdir}/manual ) +set( TARGET_ROOT ${CMAKE_SOURCE_DIR}/manual ) message( STATUS "========== Configuring ${TARGET} ==========" ) @@ -13,7 +13,7 @@ endif() set( host "alphamanual.audacityteam.org" ) set( src "https://${host}/man" ) set( dst "${_DEST}/help/manual" ) -set( script_dir "${topdir}/scripts/mw2html_audacity" ) +set( script_dir "${CMAKE_SOURCE_DIR}/scripts/mw2html_audacity" ) set( script "mw2html.py" ) set( out_dir "${_INTDIR}" ) set( out "${out_dir}/${host}/index.html" ) diff --git a/images/CMakeLists.txt b/images/CMakeLists.txt index 6bf3d469f..d8fb4d175 100755 --- a/images/CMakeLists.txt +++ b/images/CMakeLists.txt @@ -1,6 +1,6 @@ set( TARGET images ) -set( TARGET_ROOT ${topdir}/images ) +set( TARGET_ROOT ${CMAKE_SOURCE_DIR}/images ) message( STATUS "========== Configuring ${TARGET} ==========" ) diff --git a/locale/CMakeLists.txt b/locale/CMakeLists.txt index b58275b90..ad8ab50f7 100755 --- a/locale/CMakeLists.txt +++ b/locale/CMakeLists.txt @@ -1,5 +1,5 @@ set( TARGET locale ) -set( TARGET_ROOT ${topdir}/locale ) +set( TARGET_ROOT ${CMAKE_SOURCE_DIR}/locale ) message( STATUS "========== Configuring ${TARGET} ==========" ) diff --git a/nyquist/CMakeLists.txt b/nyquist/CMakeLists.txt index ad49904d9..62bd06f4b 100755 --- a/nyquist/CMakeLists.txt +++ b/nyquist/CMakeLists.txt @@ -1,6 +1,6 @@ set( TARGET nyquist ) -set( TARGET_ROOT ${topdir}/nyquist ) +set( TARGET_ROOT ${CMAKE_SOURCE_DIR}/nyquist ) message( STATUS "========== Configuring ${TARGET} ==========" ) @@ -61,7 +61,7 @@ foreach( source ${RUNTIME} ) # Fix this when reorganizing the Nyquist sources if( source STREQUAL "system.lsp" ) if( CMAKE_SYSTEM_NAME MATCHES "Windows" ) - set( src "${libsrc}/libnyquist/nyquist/sys/win/msvc/system.lsp" ) + set( src "${CMAKE_SOURCE_DIR}/lib-src/libnyquist/nyquist/sys/win/msvc/system.lsp" ) endif() endif() diff --git a/plug-ins/CMakeLists.txt b/plug-ins/CMakeLists.txt index 518066330..165141e6a 100755 --- a/plug-ins/CMakeLists.txt +++ b/plug-ins/CMakeLists.txt @@ -1,6 +1,6 @@ set( TARGET plug-ins ) -set( TARGET_ROOT ${topdir}/plug-ins ) +set( TARGET_ROOT ${CMAKE_SOURCE_DIR}/plug-ins ) message( STATUS "========== Configuring ${TARGET} ==========" ) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 2988adb94..946daca00 100755 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,6 +1,6 @@ set( TARGET minsrc ) -set( TARGET_ROOT ${topdir} ) +set( TARGET_ROOT ${CMAKE_SOURCE_DIR} ) message( STATUS "========== Configuring ${TARGET} ==========" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2805eb388..d38fa5fec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ set( TARGET Tenacity ) -set( TARGET_ROOT ${topdir}/src ) +set( TARGET_ROOT ${CMAKE_SOURCE_DIR}/src ) message( STATUS "========== Configuring ${TARGET} ==========" ) @@ -25,7 +25,7 @@ if( GIT_FOUND ) -D "_PRVDIR=${_PRVDIR}" -P "${AUDACITY_MODULE_PATH}/Version.cmake" WORKING_DIRECTORY - ${topdir} + ${CMAKE_SOURCE_DIR} ) add_dependencies( ${TARGET} version ) @@ -1014,7 +1014,7 @@ list( APPEND HEADERS list( APPEND INCLUDES PUBLIC ${_PRVDIR} - ${topdir}/include + ${CMAKE_SOURCE_DIR}/include ${TARGET_ROOT} ) @@ -1387,11 +1387,11 @@ else() FILES_MATCHING PATTERN "*.so*" ) install( FILES "${_INTDIR}/tenacity.desktop" DESTINATION "${_DATADIR}/applications" ) - install( FILES "${topdir}/LICENSE.txt" "${topdir}/README.md" + install( FILES "${CMAKE_SOURCE_DIR}/LICENSE.txt" "${CMAKE_SOURCE_DIR}/README.md" DESTINATION "${_DATADIR}/doc/${AUDACITY_NAME}" ) install( FILES "${_SRCDIR}/tenacity.xml" DESTINATION "${_DATADIR}/mime/packages" ) - install( FILES "${topdir}/presets/EQDefaultCurves.xml" + install( FILES "${CMAKE_SOURCE_DIR}/presets/EQDefaultCurves.xml" DESTINATION "${_PKGDATA}" ) install( PROGRAMS "${PROJECT_SOURCE_DIR}/linux/tenacity.sh" DESTINATION "."