diff options
author | h.udo <hudokkow@gmail.com> | 2016-09-08 16:42:58 +0100 |
---|---|---|
committer | h.udo <hudokkow@gmail.com> | 2016-12-21 10:04:18 +0000 |
commit | b0cad85adb045b88347cf8cded6770c7dd349406 (patch) | |
tree | 1a0b452f530dd2aa4e139c8e6de3f18b01a66bf2 /cmake | |
parent | a18701e7b2fe03780f90502d5d51e09cdc3ad718 (diff) |
[cmake] Move to root folder: Update paths
Diffstat (limited to 'cmake')
29 files changed, 265 insertions, 254 deletions
diff --git a/cmake/README.md b/cmake/README.md index f3d727e548..75ea2677fe 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -82,7 +82,7 @@ mkdir kodi-build && cd kodi-build ### Linux with GNU Makefiles ``` -cmake <KODI_SRC>/project/cmake/ +cmake <KODI_SRC> cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc) ./kodi.bin ``` @@ -108,14 +108,14 @@ Generated packages can be found in <BUILD_DIR>/packages. ### Raspberry Pi with GNU Makefiles ``` -cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC>/project/cmake/ +cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC> cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc) ``` ### Windows with Visual Studio project files ``` -cmake -G "Visual Studio 14" <KODI_SRC>/project/cmake/ +cmake -G "Visual Studio 14" <KODI_SRC> cmake --build . --config "Debug" # or: Build solution with Visual Studio Debug\kodi.exe ``` @@ -128,7 +128,7 @@ builds an installable package for Windows. ### Windows with NMake Makefiles ``` -cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release <KODI_SRC>/project/cmake/ +cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release <KODI_SRC> cmake --build . # or: nmake kodi.exe ``` @@ -136,7 +136,7 @@ kodi.exe ### macOS with GNU Makefiles ``` -cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC>/project/cmake/ +cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC> cmake --build . -- VERBOSE=1 -j$(sysctl -n hw.ncpu) # or: make VERBOSE=1 -j$(sysctl -n hw.ncpu) ./kodi.bin ``` @@ -144,7 +144,7 @@ cmake --build . -- VERBOSE=1 -j$(sysctl -n hw.ncpu) # or: make VERBOSE=1 -j$(sy ### macOS with Xcode project files ``` -cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake -G "Xcode" <KODI_SRC>/project/cmake/ +cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake -G "Xcode" <KODI_SRC> cmake --build . --config "Release" -- -verbose -jobs $(sysctl -n hw.ncpu) # or: Build solution with Xcode ./Release/kodi.bin ``` @@ -168,7 +168,7 @@ make deb ### Android with GNU Makefiles ``` -cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC>/project/cmake/ +cmake -DCMAKE_TOOLCHAIN_FILE=<KODI_SRC>/tools/depends/target/Toolchain.cmake <KODI_SRC> cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc) ``` @@ -203,7 +203,7 @@ cmake ... -DFFMPEG_PATH=/opt/ffmpeg -DENABLE_INTERNAL_FFMPEG=OFF ... ``` For more information and an updated list of option, please check the -main [project/cmake/CMakeLists.txt](https://github.com/xbmc/xbmc/tree/master/project/cmake/CMakeLists.txt). +main [CMakeLists.txt](https://github.com/xbmc/xbmc/tree/master/CMakeLists.txt). ## Tests @@ -261,7 +261,7 @@ paths are used, they are considered relative to the build directory in which Both methods work only for already existing addons. See this [forum thread](http://forum.kodi.tv/showthread.php?tid=219166&pid=1934922#pid1934922) -and [addons/README.md](https://github.com/xbmc/xbmc/blob/master/project/cmake/addons/README.md) +and [addons/README.md](https://github.com/xbmc/xbmc/blob/master/cmake/addons/README.md) for addon development and detailed documentation about the addon build system. ## Sanitizers @@ -269,7 +269,7 @@ for addon development and detailed documentation about the addon build system. Clang and GCC support different kinds of Sanitizers. To enable a Sanitizer call CMake with the option `-DECM_ENABLE_SANITIZERS=’san1;san2;...'`. For more information about enabling the Sanitizers read the documentation in -[modules/extra/ECMEnableSanitizers.cmake](https://github.com/xbmc/xbmc/tree/master/project/cmake/modules/extra/ECMEnableSanitizers.cmake). +[modules/extra/ECMEnableSanitizers.cmake](https://github.com/xbmc/xbmc/tree/master/cmake/modules/extra/ECMEnableSanitizers.cmake). It is also recommended to read the sections about the Sanitizers in the [Clang documentation](http://clang.llvm.org/docs/). diff --git a/cmake/addons/CMakeLists.txt b/cmake/addons/CMakeLists.txt index 96e544bb44..f1e2fce04a 100644 --- a/cmake/addons/CMakeLists.txt +++ b/cmake/addons/CMakeLists.txt @@ -31,7 +31,7 @@ if(APP_ROOT) message(WARNING "APP_ROOT is deprecated. Please use CORE_SOURCE_DIR instead.") endif() if(NOT CORE_SOURCE_DIR) - set(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../..) + set(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../..) else() file(TO_CMAKE_PATH "${CORE_SOURCE_DIR}" CORE_SOURCE_DIR) endif() @@ -52,7 +52,7 @@ endif() get_filename_component(ADDON_DEPENDS_PATH "${ADDON_DEPENDS_PATH}" ABSOLUTE) if(NOT PLATFORM_DIR) - set(PLATFORM_DIR ${CORE_SOURCE_DIR}/project/cmake/platform/${CORE_SYSTEM_NAME}) + set(PLATFORM_DIR ${CORE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}) file(TO_CMAKE_PATH "${PLATFORM_DIR}" PLATFORM_DIR) endif() @@ -155,7 +155,7 @@ if(EXISTS ${PLATFORM_DIR}/defines.txt) endif() # include check_target_platform() function -include(${CORE_SOURCE_DIR}/project/cmake/scripts/common/CheckTargetPlatform.cmake) +include(${CORE_SOURCE_DIR}/cmake/scripts/common/CheckTargetPlatform.cmake) set(ADDON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) if(NOT WIN32) @@ -171,7 +171,7 @@ endif() ### prepare the build environment for the binary addons # copy the PrepareEnv.cmake script to the depends path so that we can include it -file(COPY ${CORE_SOURCE_DIR}/project/cmake/scripts/common/PrepareEnv.cmake DESTINATION ${APP_LIB_DIR}) +file(COPY ${CORE_SOURCE_DIR}/cmake/scripts/common/PrepareEnv.cmake DESTINATION ${APP_LIB_DIR}) # add the location of PrepareEnv.cmake to CMAKE_MODULE_PATH so that it is found list(APPEND CMAKE_MODULE_PATH ${APP_LIB_DIR}) @@ -371,7 +371,7 @@ foreach(addon ${addons}) set(${id}_DEPENDS_DIR ${SOURCE_DIR}/depends) if(EXISTS ${${id}_DEPENDS_DIR}) - include(${CORE_SOURCE_DIR}/project/cmake/scripts/common/HandleDepends.cmake) + include(${CORE_SOURCE_DIR}/cmake/scripts/common/HandleDepends.cmake) add_addon_depends(${id} ${${id}_DEPENDS_DIR}) if(${id}_DEPS AND NOT "${${id}_DEPS}" STREQUAL "") message(STATUS "${id} DEPENDENCIES: ${${id}_DEPS}") diff --git a/cmake/addons/depends/CMakeLists.txt b/cmake/addons/depends/CMakeLists.txt index 622701de79..831e0ed74c 100644 --- a/cmake/addons/depends/CMakeLists.txt +++ b/cmake/addons/depends/CMakeLists.txt @@ -29,7 +29,7 @@ endif() get_filename_component(BUILD_DIR "${BUILD_DIR}" ABSOLUTE) ## use add_addon_depends to handle the cmake based dependencies -include(${CORE_SOURCE_DIR}/project/cmake/scripts/common/HandleDepends.cmake) +include(${CORE_SOURCE_DIR}/cmake/scripts/common/HandleDepends.cmake) add_addon_depends(depends "${PROJECT_SOURCE_DIR}") ## if there's a platform-specific sub-directory containing a CMakeLists.txt, add it to the build as well diff --git a/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt b/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt index 2c2c4b8e3f..bb854053de 100644 --- a/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt +++ b/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt @@ -6,7 +6,7 @@ function(generate_mingw32_wrapper cmd) configure_file(${PROJECT_SOURCE_DIR}/mingw32-cmd.bat.in ${MINGW_PATH}/bin/${CMD}.bat @ONLY) endfunction() -get_filename_component(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../../../../../.. REALPATH) +get_filename_component(CORE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../../../../.. REALPATH) set(MSYS_PATH "${CORE_SOURCE_DIR}/project/BuildDependencies/msys64") set(MINGW_PATH "${MSYS_PATH}/mingw32") diff --git a/cmake/cpack/CPackConfigDEB.cmake b/cmake/cpack/CPackConfigDEB.cmake index cb8e59e840..b7b4d8c048 100644 --- a/cmake/cpack/CPackConfigDEB.cmake +++ b/cmake/cpack/CPackConfigDEB.cmake @@ -1,5 +1,5 @@ # include Macros.cmake to automate generation of time/date stamps, maintainer, etc. -include(${PROJECT_SOURCE_DIR}/scripts/common/Macros.cmake) +include(${CMAKE_SOURCE_DIR}/cmake/scripts/common/Macros.cmake) # find stuff we need find_program(LSB_RELEASE_CMD lsb_release) @@ -73,7 +73,6 @@ endif() # package name string(TIMESTAMP PACKAGE_TIMESTAMP "%Y%m%d.%H%M" UTC) set(PACKAGE_NAME_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}~git${PACKAGE_TIMESTAMP}-${RELEASE_IDENTIFIER}-${DISTRO_CODENAME}) -unset(RELEASE_IDENTIFIER) # package version if(DEBIAN_PACKAGE_EPOCH) @@ -102,7 +101,7 @@ endif() # package description common to all packages if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) - file(STRINGS ${PROJECT_SOURCE_DIR}/cpack/deb/package-description.txt DESC_LINES) + file(STRINGS ${CMAKE_SOURCE_DIR}/cmake/cpack/deb/package-description.txt DESC_LINES) foreach(LINE IN LISTS DESC_LINES) set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_DEBIAN_PACKAGE_DESCRIPTION} ${LINE}\n") endforeach() @@ -119,10 +118,10 @@ rfc2822stamp() # two spaces between maintainer and timestamp is NOT a mistake set(CHANGELOG_FOOTER " -- ${CPACK_DEBIAN_PACKAGE_MAINTAINER} ${RFC2822_TIMESTAMP}") -if(GIT_FOUND AND GZIP_CMD AND EXISTS ${CORE_SOURCE_DIR}/.git) +if(GIT_FOUND AND GZIP_CMD AND EXISTS ${CMAKE_SOURCE_DIR}/.git) execute_process(COMMAND ${GIT_EXECUTABLE} log --no-merges --pretty=format:"%n [%an]%n * %s" --since="last month" OUTPUT_VARIABLE CHANGELOG - WORKING_DIRECTORY ${CORE_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_STRIP_TRAILING_WHITESPACE) string(REPLACE "\"" "" CHANGELOG ${CHANGELOG}) file(WRITE ${CPACK_PACKAGE_DIRECTORY}/deb/changelog.Debian ${CHANGELOG_HEADER}\n${CHANGELOG}\n\n${CHANGELOG_FOOTER}) @@ -135,7 +134,7 @@ else() endif() # Generate NEWS.Debian -configure_file(${PROJECT_SOURCE_DIR}/cpack/deb/NEWS.Debian +configure_file(${CMAKE_SOURCE_DIR}/cmake/cpack/deb/NEWS.Debian ${CPACK_PACKAGE_DIRECTORY}/deb/NEWS.Debian @ONLY) if(GZIP_CMD) execute_process(COMMAND ${GZIP_CMD} -f -9 -n ${CPACK_PACKAGE_DIRECTORY}/deb/NEWS.Debian) @@ -144,18 +143,18 @@ else() endif() # Generate man pages -configure_file(${CORE_SOURCE_DIR}/docs/manpages/kodi.bin.1 +configure_file(${CMAKE_SOURCE_DIR}/docs/manpages/kodi.bin.1 ${CPACK_PACKAGE_DIRECTORY}/deb/kodi.1 COPYONLY) -configure_file(${CORE_SOURCE_DIR}/docs/manpages/kodi.bin.1 +configure_file(${CMAKE_SOURCE_DIR}/docs/manpages/kodi.bin.1 ${CPACK_PACKAGE_DIRECTORY}/deb/kodi.bin.1 COPYONLY) -configure_file(${CORE_SOURCE_DIR}/docs/manpages/kodi-standalone.1 +configure_file(${CMAKE_SOURCE_DIR}/docs/manpages/kodi-standalone.1 ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-standalone.1 COPYONLY) if(ENABLE_EVENTCLIENTS) - configure_file(${CORE_SOURCE_DIR}/docs/manpages/kodi-ps3remote.1 + configure_file(${CMAKE_SOURCE_DIR}/docs/manpages/kodi-ps3remote.1 ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-ps3remote.1 COPYONLY) - configure_file(${CORE_SOURCE_DIR}/docs/manpages/kodi-send.1 + configure_file(${CMAKE_SOURCE_DIR}/docs/manpages/kodi-send.1 ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-send.1 COPYONLY) - configure_file(${CORE_SOURCE_DIR}/docs/manpages/kodi-wiiremote.1 + configure_file(${CMAKE_SOURCE_DIR}/docs/manpages/kodi-wiiremote.1 ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-wiiremote.1 COPYONLY) endif() @@ -190,7 +189,7 @@ install(FILES ${CPACK_PACKAGE_DIRECTORY}/deb/kodi-wiiremote.1.gz endif() # configure package metadata files -file(GLOB DEBIAN_PACKAGE_FILES ${PROJECT_SOURCE_DIR}/cpack/deb/packages/*.txt.in) +file(GLOB DEBIAN_PACKAGE_FILES ${CMAKE_SOURCE_DIR}/cmake/cpack/deb/packages/*.txt.in) foreach(file ${DEBIAN_PACKAGE_FILES}) get_filename_component(package ${file} NAME_WE) # filter eventclients so we don't have to support two more deps @@ -304,18 +303,18 @@ ${DEB_PACKAGE_DESCRIPTION_FOOTER}") install(FILES ${CPACK_PACKAGE_DIRECTORY}/deb/changelog.Debian.gz ${CPACK_PACKAGE_DIRECTORY}/deb/NEWS.Debian.gz - ${PROJECT_SOURCE_DIR}/cpack/deb/copyright + ${CMAKE_SOURCE_DIR}/cmake/cpack/deb/copyright DESTINATION share/doc/${file} COMPONENT ${file}) # kodi package exclusive files if(CPACK_DEBIAN_KODI_PACKAGE_NAME) set(CPACK_DEBIAN_KODI_PACKAGE_CONTROL_EXTRA - "${PROJECT_SOURCE_DIR}/cpack/deb/postinst;${PROJECT_SOURCE_DIR}/cpack/deb/postrm") - install(FILES ${PROJECT_SOURCE_DIR}/cpack/deb/lintian/overrides/kodi + "${CMAKE_SOURCE_DIR}/cmake/cpack/deb/postinst;${CMAKE_SOURCE_DIR}/cmake/cpack/deb/postrm") + install(FILES ${CMAKE_SOURCE_DIR}/cmake/cpack/deb/lintian/overrides/kodi DESTINATION share/lintian/overrides COMPONENT kodi) - install(FILES ${PROJECT_SOURCE_DIR}/cpack/deb/menu/kodi + install(FILES ${CMAKE_SOURCE_DIR}/cmake/cpack/deb/menu/kodi DESTINATION share/menu COMPONENT kodi) endif() @@ -327,10 +326,8 @@ unset(DEBIAN_PACKAGES) set(CPACK_SOURCE_GENERATOR TGZ) # source package name -set(CPACK_SOURCE_PACKAGE_FILE_NAME ${APP_NAME_LC}_${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}~git${PACKAGE_TIMESTAMP}-${GIT_HASH}.orig) - -# source dir -set(CMAKE_SOURCE_DIR ${CORE_SOURCE_DIR}) +set(CPACK_SOURCE_PACKAGE_FILE_NAME ${APP_NAME_LC}_${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}~git${PACKAGE_TIMESTAMP}-${RELEASE_IDENTIFIER}.orig) +unset(RELEASE_IDENTIFIER) # ignore files for source package set(CPACK_SOURCE_IGNORE_FILES diff --git a/cmake/cpack/deb/copyright b/cmake/cpack/deb/copyright index a79cf54f63..ba82f18883 100644 --- a/cmake/cpack/deb/copyright +++ b/cmake/cpack/deb/copyright @@ -1,7 +1,7 @@ Kodi is downloaded from http://kodi.tv/. Orig tarballs are generated from the script located at -https://github.com/Kodi/Kodi/tree/master/project/cmake. The -orig tarball is generated using the sources in https://github.com/Kodi/Kodi. +https://github.com/xbmc/xbmc/. The orig tarball is +generated using the sources in https://github.com/xbmc/xbmc/. Main Contact: "Team-Kodi" <team at kodi dot tv> diff --git a/cmake/modules/FindCpluff.cmake b/cmake/modules/FindCpluff.cmake index ce6c127cb5..3705bd8196 100644 --- a/cmake/modules/FindCpluff.cmake +++ b/cmake/modules/FindCpluff.cmake @@ -17,10 +17,10 @@ if(NOT WIN32) set(cppflags "-arch ${CPU}") endif() - ExternalProject_Add(libcpluff SOURCE_DIR ${CORE_SOURCE_DIR}/lib/cpluff + ExternalProject_Add(libcpluff SOURCE_DIR ${CMAKE_SOURCE_DIR}/lib/cpluff BUILD_IN_SOURCE 1 PREFIX ${CORE_BUILD_DIR}/cpluff - CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} ${CORE_SOURCE_DIR}/lib/cpluff/configure + CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} ${CMAKE_SOURCE_DIR}/lib/cpluff/configure --disable-nls --enable-static --disable-shared diff --git a/cmake/modules/FindCrossGUID.cmake b/cmake/modules/FindCrossGUID.cmake index ba2823a7ae..0f0d72099a 100644 --- a/cmake/modules/FindCrossGUID.cmake +++ b/cmake/modules/FindCrossGUID.cmake @@ -1,6 +1,6 @@ if(ENABLE_INTERNAL_CROSSGUID) include(ExternalProject) - file(STRINGS ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/Makefile VER) + file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/Makefile VER) string(REGEX MATCH "VERSION=[^ ]*" CGUID_VER "${VER}") list(GET CGUID_VER 0 CGUID_VER) string(SUBSTRING "${CGUID_VER}" 8 -1 CGUID_VER) @@ -30,13 +30,13 @@ if(ENABLE_INTERNAL_CROSSGUID) -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} "${EXTRA_ARGS}" PATCH_COMMAND ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/CMakeLists.txt + ${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/CMakeLists.txt <SOURCE_DIR> && ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/FindUUID.cmake + ${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/FindUUID.cmake <SOURCE_DIR> && ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/crossguid/FindCXX11.cmake + ${CMAKE_SOURCE_DIR}/tools/depends/target/crossguid/FindCXX11.cmake <SOURCE_DIR> BUILD_BYPRODUCTS ${CROSSGUID_LIBRARY}) set_target_properties(crossguid PROPERTIES FOLDER "External Projects") diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake index 3d7fcc8ca3..d38fba503b 100644 --- a/cmake/modules/FindFFMPEG.cmake +++ b/cmake/modules/FindFFMPEG.cmake @@ -211,7 +211,7 @@ endif() # Internal FFMPEG if(NOT FFMPEG_FOUND) include(ExternalProject) - file(STRINGS ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/FFMPEG-VERSION VER) + file(STRINGS ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/FFMPEG-VERSION VER) string(REGEX MATCH "VERSION=[^ ]*$.*" FFMPEG_VER "${VER}") list(GET FFMPEG_VER 0 FFMPEG_VER) string(SUBSTRING "${FFMPEG_VER}" 8 -1 FFMPEG_VER) @@ -256,10 +256,10 @@ if(NOT FFMPEG_FOUND) -DCORE_SYSTEM_NAME=${CORE_SYSTEM_NAME} ${CROSS_ARGS} PATCH_COMMAND ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt + ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt <SOURCE_DIR> && ${CMAKE_COMMAND} -E copy - ${CORE_SOURCE_DIR}/tools/depends/target/ffmpeg/FindGnuTls.cmake + ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/FindGnuTls.cmake <SOURCE_DIR>) file(WRITE ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ffmpeg/ffmpeg-link-wrapper diff --git a/cmake/modules/FindJsonSchemaBuilder.cmake b/cmake/modules/FindJsonSchemaBuilder.cmake index 3bffb4831c..cdaa2d5d7e 100644 --- a/cmake/modules/FindJsonSchemaBuilder.cmake +++ b/cmake/modules/FindJsonSchemaBuilder.cmake @@ -14,7 +14,7 @@ if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder) IMPORTED_LOCATION "${NATIVEPREFIX}/bin/JsonSchemaBuilder") set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES FOLDER Tools) else() - add_subdirectory(${CORE_SOURCE_DIR}/tools/depends/native/JsonSchemaBuilder build/jsonschemabuilder) + add_subdirectory(${CMAKE_SOURCE_DIR}/tools/depends/native/JsonSchemaBuilder build/jsonschemabuilder) add_executable(JsonSchemaBuilder::JsonSchemaBuilder ALIAS JsonSchemaBuilder) set_target_properties(JsonSchemaBuilder PROPERTIES FOLDER Tools) endif() diff --git a/cmake/modules/FindLibDvd.cmake b/cmake/modules/FindLibDvd.cmake index 1f02b5f226..cc24e9b56f 100644 --- a/cmake/modules/FindLibDvd.cmake +++ b/cmake/modules/FindLibDvd.cmake @@ -49,7 +49,7 @@ if(NOT WIN32) list(APPEND dvdlibs libdvdcss) endif() foreach(dvdlib ${dvdlibs}) - file(GLOB VERSION_FILE ${CORE_SOURCE_DIR}/tools/depends/target/${dvdlib}/DVD*-VERSION) + file(GLOB VERSION_FILE ${CMAKE_SOURCE_DIR}/tools/depends/target/${dvdlib}/DVD*-VERSION) file(STRINGS ${VERSION_FILE} VER) string(REGEX MATCH "VERSION=[^ ]*$.*" ${dvdlib}_VER "${VER}") list(GET ${dvdlib}_VER 0 ${dvdlib}_VER) @@ -203,7 +203,7 @@ if(NOT WIN32) endif() else() # Dynamically loaded on Windows - find_path(LIBDVD_INCLUDE_DIR dvdcss/dvdcss.h PATHS ${CORE_SOURCE_DIR}/lib/libdvd/include) + find_path(LIBDVD_INCLUDE_DIR dvdcss/dvdcss.h PATHS ${CMAKE_SOURCE_DIR}/lib/libdvd/include) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LIBDVD REQUIRED_VARS LIBDVD_INCLUDE_DIR) diff --git a/cmake/modules/FindTexturePacker.cmake b/cmake/modules/FindTexturePacker.cmake index 677b4d983b..aa6fd3aea6 100644 --- a/cmake/modules/FindTexturePacker.cmake +++ b/cmake/modules/FindTexturePacker.cmake @@ -19,7 +19,7 @@ if(NOT TARGET TexturePacker::TexturePacker) elseif(WIN32) add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) set_target_properties(TexturePacker::TexturePacker PROPERTIES - IMPORTED_LOCATION "${CORE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe") + IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe") else() if(WITH_TEXTUREPACKER) get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE) @@ -34,7 +34,7 @@ if(NOT TARGET TexturePacker::TexturePacker) endif() mark_as_advanced(TEXTUREPACKER) else() - add_subdirectory(${CORE_SOURCE_DIR}/tools/depends/native/TexturePacker build/texturepacker) + add_subdirectory(${CMAKE_SOURCE_DIR}/tools/depends/native/TexturePacker build/texturepacker) add_executable(TexturePacker::TexturePacker ALIAS TexturePacker) endif() endif() diff --git a/cmake/scripts/android/ArchSetup.cmake b/cmake/scripts/android/ArchSetup.cmake index 281f94f869..1337e5a1e3 100644 --- a/cmake/scripts/android/ArchSetup.cmake +++ b/cmake/scripts/android/ArchSetup.cmake @@ -1,5 +1,5 @@ if(NOT CMAKE_TOOLCHAIN_FILE) - message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for android. See ${PROJECT_SOURCE_DIR}/README.md") + message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for android. See ${CMAKE_SOURCE_DIR}/cmake/README.md") elseif(NOT SDK_PLATFORM) message(FATAL_ERROR "Toolchain did not define SDK_PLATFORM. Possibly outdated depends.") endif() diff --git a/cmake/scripts/android/Install.cmake b/cmake/scripts/android/Install.cmake index 025f194cb5..b1084dfcc1 100644 --- a/cmake/scripts/android/Install.cmake +++ b/cmake/scripts/android/Install.cmake @@ -14,11 +14,11 @@ if(NOT ZIPALIGN_EXECUTABLE) endif() # Configure files into packaging environment. -configure_file(${CORE_SOURCE_DIR}/tools/android/packaging/Makefile.in +configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/Makefile.in ${CMAKE_BINARY_DIR}/tools/android/packaging/Makefile @ONLY) -configure_file(${CORE_SOURCE_DIR}/tools/android/packaging/apksign +configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/apksign ${CMAKE_BINARY_DIR}/tools/android/packaging/apksign COPYONLY) -configure_file(${CORE_SOURCE_DIR}/tools/android/packaging/make_symbols.sh +configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/make_symbols.sh ${CMAKE_BINARY_DIR}/tools/android/packaging/make_symbols.sh COPYONLY) file(WRITE ${CMAKE_BINARY_DIR}/tools/depends/Makefile.include "$(PREFIX)/lib/${APP_NAME_LC}/lib${APP_NAME_LC}.so: ;\n") @@ -35,15 +35,15 @@ set(package_files strings.xml src/org/xbmc/kodi/Splash.java src/org/xbmc/kodi/XBMCBroadcastReceiver.java) foreach(file IN LISTS package_files) - configure_file(${CORE_SOURCE_DIR}/tools/android/packaging/xbmc/${file}.in + configure_file(${CMAKE_SOURCE_DIR}/tools/android/packaging/xbmc/${file}.in ${CMAKE_BINARY_DIR}/tools/android/packaging/xbmc/${file} @ONLY) endforeach() # Copy files to the location expected by the Android packaging scripts. add_custom_target(bundle - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CORE_SOURCE_DIR}/tools/android/packaging/media + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/android/packaging/media ${CMAKE_BINARY_DIR}/tools/android/packaging/media - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CORE_SOURCE_DIR}/tools/android/packaging/xbmc/res + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/android/packaging/xbmc/res ${CMAKE_BINARY_DIR}/tools/android/packaging/xbmc/res COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/lib/python2.7 ${libdir}/python2.7 COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDS_PATH}/share/${APP_NAME_LC} ${datadir}/${APP_NAME_LC} @@ -101,7 +101,7 @@ foreach(target apk obb apk-unsigned apk-obb apk-obb-unsigned apk-noobb apk-clean add_custom_target(${target} COMMAND PATH=${NATIVEPREFIX}/bin:$ENV{PATH} ${CMAKE_MAKE_PROGRAM} -C ${CMAKE_BINARY_DIR}/tools/android/packaging - CORE_SOURCE_DIR=${CORE_SOURCE_DIR} + CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} CC=${CMAKE_C_COMPILER} CPU=${CPU} ARCH=${ARCH} diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake index 4b862c8b50..58b2cfe44b 100644 --- a/cmake/scripts/common/ArchSetup.cmake +++ b/cmake/scripts/common/ArchSetup.cmake @@ -82,17 +82,17 @@ else() endif() # Main cpp -set(CORE_MAIN_SOURCE ${CORE_SOURCE_DIR}/xbmc/platform/posix/main.cpp) +set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/posix/main.cpp) # system specific arch setup -if(NOT EXISTS ${PROJECT_SOURCE_DIR}/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake) +if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake) message(FATAL_ERROR "Couldn't find configuration for '${CORE_SYSTEM_NAME}' " "Either the platform is not (yet) supported " "or a toolchain file has to be specified. " - "Consult ${CMAKE_SOURCE_DIR}/README.md for instructions. " + "Consult ${CMAKE_SOURCE_DIR}/cmake/README.md for instructions. " "Note: Specifying a toolchain requires a clean build directory!") endif() -include(${PROJECT_SOURCE_DIR}/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake) +include(${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake) message(STATUS "Core system type: ${CORE_SYSTEM_NAME}") message(STATUS "Platform: ${PLATFORM}") diff --git a/cmake/scripts/common/GenerateVersionedFiles.cmake b/cmake/scripts/common/GenerateVersionedFiles.cmake index e105b277e8..6062362fd5 100644 --- a/cmake/scripts/common/GenerateVersionedFiles.cmake +++ b/cmake/scripts/common/GenerateVersionedFiles.cmake @@ -1,4 +1,4 @@ -include(${CORE_SOURCE_DIR}/project/cmake/scripts/common/Macros.cmake) +include(${CORE_SOURCE_DIR}/cmake/scripts/common/Macros.cmake) core_find_versions() file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/addons/xbmc.addon) diff --git a/cmake/scripts/common/HandleDepends.cmake b/cmake/scripts/common/HandleDepends.cmake index adc105bf31..85d2cf43e9 100644 --- a/cmake/scripts/common/HandleDepends.cmake +++ b/cmake/scripts/common/HandleDepends.cmake @@ -1,4 +1,4 @@ -include(${CORE_SOURCE_DIR}/project/cmake/scripts/common/CheckTargetPlatform.cmake) +include(${CORE_SOURCE_DIR}/cmake/scripts/common/CheckTargetPlatform.cmake) # handle addon depends function(add_addon_depends addon searchpath) diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake index 62dfb873b5..6846ab00ac 100644 --- a/cmake/scripts/common/Macros.cmake +++ b/cmake/scripts/common/Macros.cmake @@ -1,7 +1,12 @@ # This script holds the main functions used to construct the build system -# include system specific macros -include(${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/Macros.cmake) +# Include system specific macros but only if this file is included from +# kodi main project. It's not needed for kodi-addons project +# If CORE_SOURCE_DIR is set, it was called from kodi-addons project +# TODO: drop check if we ever integrate kodi-addons into kodi project +if(NOT CORE_SOURCE_DIR) + include(${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/Macros.cmake) +endif() # IDEs: Group source files in target in folders (file system hierarchy) # Source: http://blog.audio-tk.com/2015/09/01/sorting-source-files-and-projects-in-folders-with-cmake-and-visual-studioxcode/ @@ -72,7 +77,7 @@ function(core_add_library name) # Add precompiled headers to Kodi main libraries if(CORE_SYSTEM_NAME STREQUAL windows) - add_precompiled_header(${name} pch.h ${CORE_SOURCE_DIR}/xbmc/platform/win32/pch.cpp PCH_TARGET kodi) + add_precompiled_header(${name} pch.h ${CMAKE_SOURCE_DIR}/xbmc/platform/win32/pch.cpp PCH_TARGET kodi) set_language_cxx(${name}) target_link_libraries(${name} PUBLIC effects11) endif() @@ -118,8 +123,8 @@ function(core_add_addon_library name) set_target_properties(${name} PROPERTIES FOLDER addons) target_include_directories(${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi - ${CORE_SOURCE_DIR}/xbmc) + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi + ${CMAKE_SOURCE_DIR}/xbmc) endfunction() # Add an dl-loaded shared library @@ -191,7 +196,7 @@ endfunction() # Optional Arguments: # NO_INSTALL: exclude file from installation target (only mirror) # DIRECTORY: directory where the file should be mirrored to -# (default: preserve tree structure relative to CORE_SOURCE_DIR) +# (default: preserve tree structure relative to CMAKE_SOURCE_DIR) # On return: # Files is mirrored to the build tree and added to ${install_data} # (if NO_INSTALL is not given). @@ -202,7 +207,7 @@ function(copy_file_to_buildtree file) get_filename_component(outfile ${file} NAME) set(outfile ${outdir}/${outfile}) else() - string(REPLACE "${CORE_SOURCE_DIR}/" "" outfile ${file}) + string(REPLACE "${CMAKE_SOURCE_DIR}/" "" outfile ${file}) get_filename_component(outdir ${outfile} DIRECTORY) endif() @@ -243,7 +248,7 @@ endfunction() # Optional Arguments: # NO_INSTALL: exclude files from installation target # Implicit arguments: -# CORE_SOURCE_DIR - root of source tree +# CMAKE_SOURCE_DIR - root of source tree # On return: # Files are mirrored to the build tree and added to ${install_data} # (if NO_INSTALL is not given). @@ -273,17 +278,17 @@ function(copy_files_from_filelist_to_buildtree pattern) # If the full path to an existing file is specified then add that single file. # Don't recursively add all files with the given name. - if(EXISTS ${CORE_SOURCE_DIR}/${src} AND NOT IS_DIRECTORY ${CORE_SOURCE_DIR}/${src}) + if(EXISTS ${CMAKE_SOURCE_DIR}/${src} AND NOT IS_DIRECTORY ${CMAKE_SOURCE_DIR}/${src}) set(files ${src}) else() - file(GLOB_RECURSE files RELATIVE ${CORE_SOURCE_DIR} ${CORE_SOURCE_DIR}/${src}) + file(GLOB_RECURSE files RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/${src}) endif() foreach(file ${files}) if(arg_NO_INSTALL) - copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} DIRECTORY ${dest} NO_INSTALL) + copy_file_to_buildtree(${CMAKE_SOURCE_DIR}/${file} DIRECTORY ${dest} NO_INSTALL) else() - copy_file_to_buildtree(${CORE_SOURCE_DIR}/${file} DIRECTORY ${dest}) + copy_file_to_buildtree(${CMAKE_SOURCE_DIR}/${file} DIRECTORY ${dest}) endif() endforeach() endforeach() @@ -427,9 +432,9 @@ function(core_add_subdirs_from_filelist files) list(GET subdir 0 subdir_src) list(GET subdir -1 subdir_dest) if(VERBOSE) - message(STATUS " core_add_subdirs_from_filelist - adding subdir: ${CORE_SOURCE_DIR}/${subdir_src} -> ${CORE_BUILD_DIR}/${subdir_dest}") + message(STATUS " core_add_subdirs_from_filelist - adding subdir: ${CMAKE_SOURCE_DIR}/${subdir_src} -> ${CORE_BUILD_DIR}/${subdir_dest}") endif() - add_subdirectory(${CORE_SOURCE_DIR}/${subdir_src} ${CORE_BUILD_DIR}/${subdir_dest}) + add_subdirectory(${CMAKE_SOURCE_DIR}/${subdir_src} ${CORE_BUILD_DIR}/${subdir_dest}) endforeach() endforeach() endfunction() @@ -466,9 +471,9 @@ macro(core_add_optional_subdirs_from_filelist pattern) foreach(opt ${opts}) if(ENABLE_${opt}) if(VERBOSE) - message(STATUS " core_add_optional_subdirs_from_filelist - adding subdir: ${CORE_SOURCE_DIR}/${subdir_src} -> ${CORE_BUILD_DIR}/${subdir_dest}") + message(STATUS " core_add_optional_subdirs_from_filelist - adding subdir: ${CMAKE_SOURCE_DIR}/${subdir_src} -> ${CORE_BUILD_DIR}/${subdir_dest}") endif() - add_subdirectory(${CORE_SOURCE_DIR}/${subdir_src} ${CORE_BUILD_DIR}/${subdir_dest}) + add_subdirectory(${CMAKE_SOURCE_DIR}/${subdir_src} ${CORE_BUILD_DIR}/${subdir_dest}) else() if(VERBOSE) message(STATUS " core_add_optional_subdirs_from_filelist: OPTION ${opt} not enabled for ${subdir_src}, skipping subdir") @@ -496,14 +501,14 @@ endfunction() # if no git tree is found, value is set to "nobody <nobody@example.com>" function(userstamp) find_package(Git) - if(GIT_FOUND AND EXISTS ${CORE_SOURCE_DIR}/.git) + if(GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git) execute_process(COMMAND ${GIT_EXECUTABLE} config user.name OUTPUT_VARIABLE username - WORKING_DIRECTORY ${CORE_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND ${GIT_EXECUTABLE} config user.email OUTPUT_VARIABLE useremail - WORKING_DIRECTORY ${CORE_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_STRIP_TRAILING_WHITESPACE) set(PACKAGE_MAINTAINER "${username} <${useremail}>" PARENT_SCOPE) else() @@ -528,29 +533,29 @@ function(core_find_git_rev stamp) set(${stamp} ${GIT_VERSION} PARENT_SCOPE) else() find_package(Git) - if(GIT_FOUND AND EXISTS ${CORE_SOURCE_DIR}/.git) + if(GIT_FOUND AND EXISTS ${CMAKE_SOURCE_DIR}/.git) execute_process(COMMAND ${GIT_EXECUTABLE} diff-files --ignore-submodules --quiet -- RESULT_VARIABLE status_code - WORKING_DIRECTORY ${CORE_SOURCE_DIR}) + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) if(NOT status_code) execute_process(COMMAND ${GIT_EXECUTABLE} diff-index --ignore-submodules --quiet HEAD -- RESULT_VARIABLE status_code - WORKING_DIRECTORY ${CORE_SOURCE_DIR}) + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) endif() if(status_code) execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"%h-dirty" HEAD OUTPUT_VARIABLE HASH - WORKING_DIRECTORY ${CORE_SOURCE_DIR}) + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) string(SUBSTRING ${HASH} 1 13 HASH) else() execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --pretty=format:"%h" HEAD OUTPUT_VARIABLE HASH - WORKING_DIRECTORY ${CORE_SOURCE_DIR}) + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) string(SUBSTRING ${HASH} 1 7 HASH) endif() execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:"%cd" --date=short HEAD OUTPUT_VARIABLE DATE - WORKING_DIRECTORY ${CORE_SOURCE_DIR}) + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) string(SUBSTRING ${DATE} 1 10 DATE) string(REPLACE "-" "" DATE ${DATE}) else() @@ -586,6 +591,15 @@ endfunction() # guilib_version - current ADDONGUI API version # guilib_version_min - minimal ADDONGUI API version macro(core_find_versions) + # kodi-addons project also calls this macro and uses CORE_SOURCE_DIR + # to point to core base dir + # Set CORE_SOURCE_DIR here, otherwise kodi main project fails + # TODO: drop this code block and refactor the rest to use CMAKE_SOURCE_DIR + # if we ever integrate kodi-addons into kodi project + if(NOT CORE_SOURCE_DIR) + set(CORE_SOURCE_DIR ${CMAKE_SOURCE_DIR}) + endif() + include(CMakeParseArguments) core_file_read_filtered(version_list ${CORE_SOURCE_DIR}/version.txt) string(REPLACE " " ";" version_list "${version_list}") diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake index 51be7395a8..1f68fdccae 100644 --- a/cmake/scripts/common/PrepareEnv.cmake +++ b/cmake/scripts/common/PrepareEnv.cmake @@ -1,5 +1,5 @@ # parse version.txt and libKODI_guilib.h to get the version and API info -include(${CORE_SOURCE_DIR}/project/cmake/scripts/common/Macros.cmake) +include(${CORE_SOURCE_DIR}/cmake/scripts/common/Macros.cmake) core_find_versions() # in case we need to download something, set KODI_MIRROR to the default if not alread set @@ -33,11 +33,11 @@ if(NOT WIN32) endif() # generate the proper KodiConfig.cmake file -configure_file(${CORE_SOURCE_DIR}/project/cmake/KodiConfig.cmake.in ${APP_LIB_DIR}/KodiConfig.cmake @ONLY) +configure_file(${CORE_SOURCE_DIR}/cmake/KodiConfig.cmake.in ${APP_LIB_DIR}/KodiConfig.cmake @ONLY) # copy cmake helpers to lib/kodi -file(COPY ${CORE_SOURCE_DIR}/project/cmake/scripts/common/AddonHelpers.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/AddOptions.cmake +file(COPY ${CORE_SOURCE_DIR}/cmake/scripts/common/AddonHelpers.cmake + ${CORE_SOURCE_DIR}/cmake/scripts/common/AddOptions.cmake DESTINATION ${APP_LIB_DIR}) ### copy all the addon binding header files to include/kodi @@ -52,8 +52,8 @@ foreach(binding ${bindings}) endforeach() ### processing additional tools required by the platform -if(EXISTS ${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/tools/) - file(GLOB platform_tools ${CORE_SOURCE_DIR}/project/cmake/scripts/${CORE_SYSTEM_NAME}/tools/*.cmake) +if(EXISTS ${CORE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/tools/) + file(GLOB platform_tools ${CORE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/tools/*.cmake) foreach(platform_tool ${platform_tools}) get_filename_component(platform_tool_name ${platform_tool} NAME_WE) message(STATUS "Processing ${CORE_SYSTEM_NAME} specific tool: ${platform_tool_name}") diff --git a/cmake/scripts/common/ProjectMacros.cmake b/cmake/scripts/common/ProjectMacros.cmake index e73ef903ed..89ecca4e9e 100644 --- a/cmake/scripts/common/ProjectMacros.cmake +++ b/cmake/scripts/common/ProjectMacros.cmake @@ -33,7 +33,7 @@ function(copy_skin_to_buildtree skin) copy_file_to_buildtree(${file}) endforeach() file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${dest}/media) - string(REPLACE "${CORE_SOURCE_DIR}/" "" dest ${skin}) + string(REPLACE "${CMAKE_SOURCE_DIR}/" "" dest ${skin}) pack_xbt(${skin}/media ${CMAKE_BINARY_DIR}/${dest}/media/Textures.xbt) file(GLOB THEMES RELATIVE ${skin}/themes ${skin}/themes/*) diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/ios/ArchSetup.cmake index f3e8590d4f..bdd2656c1b 100644 --- a/cmake/scripts/ios/ArchSetup.cmake +++ b/cmake/scripts/ios/ArchSetup.cmake @@ -1,8 +1,8 @@ if(NOT CMAKE_TOOLCHAIN_FILE) - message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for ios. See ${PROJECT_SOURCE_DIR}/README.md") + message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for ios. See ${CMAKE_SOURCE_DIR}/cmake/README.md") endif() -set(CORE_MAIN_SOURCE ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/XBMCApplication.m) +set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/XBMCApplication.m) set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS) set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_DEFINED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/ios/Install.cmake index c49fcd581b..b23e9e58bd 100644 --- a/cmake/scripts/ios/Install.cmake +++ b/cmake/scripts/ios/Install.cmake @@ -1,23 +1,23 @@ # IOS packaging -set(BUNDLE_RESOURCES ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2x.png - ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png - ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png - ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png - ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) +set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2x.png + ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png + ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png + ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png + ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png) if(CMAKE_GENERATOR STREQUAL Xcode) set(RESOURCE_LOCATION ${APP_NAME}.app) @@ -30,8 +30,8 @@ foreach(file IN LISTS BUNDLE_RESOURCES) set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION ${RESOURCE_LOCATION}) endforeach() -target_sources(${APP_NAME_LC} PRIVATE ${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings) -set_source_files_properties(${CORE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "${RESOURCE_LOCATION}/English.lproj") +target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings) +set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "${RESOURCE_LOCATION}/English.lproj") # Options for code signing propagated as env vars to Codesign.command via Xcode set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity") @@ -54,7 +54,7 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD "PRODUCT_NAME=${APP_NAME}" "WRAPPER_EXTENSION=app" "SRCROOT=${CMAKE_BINARY_DIR}" - ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command + ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." "TARGET_NAME=${APP_NAME}.app" @@ -63,23 +63,24 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD "FULL_PRODUCT_NAME=${APP_NAME}.app" "WRAPPER_EXTENSION=app" "SRCROOT=${CMAKE_BINARY_DIR}" - ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command + ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command COMMAND "XBMC_DEPENDS_ROOT=${NATIVEPREFIX}/.." "PLATFORM_NAME=${PLATFORM}" "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>" "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." "WRAPPER_NAME=${APP_NAME}.app" "APP_NAME=${APP_NAME}" - ${CORE_SOURCE_DIR}/tools/darwin/Support/Codesign.command + ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command ) set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) -configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in +configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh @ONLY) -configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh.in +configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh.in ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) add_custom_target(deb COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) add_dependencies(deb ${APP_NAME_LC}) + diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake index bcd70df74f..20342ee76c 100644 --- a/cmake/scripts/linux/ArchSetup.cmake +++ b/cmake/scripts/linux/ArchSetup.cmake @@ -35,7 +35,7 @@ include(LDGOLD) # Code Coverage if(CMAKE_BUILD_TYPE STREQUAL Coverage) set(COVERAGE_TEST_BINARY ${APP_NAME_LC}-test) - set(COVERAGE_SOURCE_DIR ${CORE_SOURCE_DIR}) + set(COVERAGE_SOURCE_DIR ${CMAKE_SOURCE_DIR}) set(COVERAGE_DEPENDS "\${APP_NAME_LC}" "\${APP_NAME_LC}-test") set(COVERAGE_EXCLUDES */test/* lib/* */lib/*) endif() diff --git a/cmake/scripts/linux/ExtraTargets.cmake b/cmake/scripts/linux/ExtraTargets.cmake index 2bb5f6fa01..4698c2ac68 100644 --- a/cmake/scripts/linux/ExtraTargets.cmake +++ b/cmake/scripts/linux/ExtraTargets.cmake @@ -2,11 +2,11 @@ if(ENABLE_X11 AND X_FOUND AND XRANDR_FOUND) find_package(X QUIET) find_package(XRandR QUIET) - add_executable(${APP_NAME_LC}-xrandr ${CORE_SOURCE_DIR}/xbmc-xrandr.c) + add_executable(${APP_NAME_LC}-xrandr ${CMAKE_SOURCE_DIR}/xbmc-xrandr.c) target_link_libraries(${APP_NAME_LC}-xrandr ${SYSTEM_LDFLAGS} ${X_LIBRARIES} m ${XRANDR_LIBRARIES}) endif() # WiiRemote if(ENABLE_EVENTCLIENTS) - add_subdirectory(${CORE_SOURCE_DIR}/tools/EventClients/Clients/WiiRemote build/WiiRemote) + add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/WiiRemote build/WiiRemote) endif() diff --git a/cmake/scripts/linux/Install.cmake b/cmake/scripts/linux/Install.cmake index 75c37dc860..7f8a2f8dba 100644 --- a/cmake/scripts/linux/Install.cmake +++ b/cmake/scripts/linux/Install.cmake @@ -22,25 +22,25 @@ set(APP_INCLUDE_DIR ${includedir}/${APP_NAME_LC}) set(CXX11_SWITCH "-std=c++11") # Set XBMC_STANDALONE_SH_PULSE so we can insert PulseAudio block into kodi-standalone -if(EXISTS ${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse) +if(EXISTS ${CMAKE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse) if(ENABLE_PULSEAUDIO AND PULSEAUDIO_FOUND) - file(READ "${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse" pulse_content) + file(READ "${CMAKE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.pulse" pulse_content) set(XBMC_STANDALONE_SH_PULSE ${pulse_content}) endif() endif() # Configure startup scripts -configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi.sh.in +configure_file(${CMAKE_SOURCE_DIR}/tools/Linux/kodi.sh.in ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC} @ONLY) -configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.in +configure_file(${CMAKE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.in ${CORE_BUILD_DIR}/scripts/${APP_NAME_LC}-standalone @ONLY) # Configure cmake files -configure_file(${PROJECT_SOURCE_DIR}/KodiConfig.cmake.in +configure_file(${CMAKE_SOURCE_DIR}/cmake/KodiConfig.cmake.in ${CORE_BUILD_DIR}/scripts/${APP_NAME}Config.cmake @ONLY) # Configure xsession entry -configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-xsession.desktop.in +configure_file(${CMAKE_SOURCE_DIR}/tools/Linux/kodi-xsession.desktop.in ${CORE_BUILD_DIR}/${APP_NAME_LC}.desktop @ONLY) # Install app @@ -83,53 +83,53 @@ install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/${APP_NAME_LC}.desktop COMPONENT kodi) # Install desktop entry -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/kodi.desktop +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/kodi.desktop DESTINATION ${datarootdir}/applications COMPONENT kodi) # Install icons -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon16x16.png +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon16x16.png RENAME ${APP_NAME_LC}.png DESTINATION ${datarootdir}/icons/hicolor/16x16/apps COMPONENT kodi) -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon22x22.png +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon22x22.png RENAME ${APP_NAME_LC}.png DESTINATION ${datarootdir}/icons/hicolor/22x22/apps COMPONENT kodi) -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon24x24.png +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon24x24.png RENAME ${APP_NAME_LC}.png DESTINATION ${datarootdir}/icons/hicolor/24x24/apps COMPONENT kodi) -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon32x32.png +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon32x32.png RENAME ${APP_NAME_LC}.png DESTINATION ${datarootdir}/icons/hicolor/32x32/apps COMPONENT kodi) -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon48x48.png +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon48x48.png RENAME ${APP_NAME_LC}.png DESTINATION ${datarootdir}/icons/hicolor/48x48/apps COMPONENT kodi) -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon64x64.png +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon64x64.png RENAME ${APP_NAME_LC}.png DESTINATION ${datarootdir}/icons/hicolor/64x64/apps COMPONENT kodi) -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon128x128.png +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon128x128.png RENAME ${APP_NAME_LC}.png DESTINATION ${datarootdir}/icons/hicolor/128x128/apps COMPONENT kodi) -install(FILES ${CORE_SOURCE_DIR}/tools/Linux/packaging/media/icon256x256.png +install(FILES ${CMAKE_SOURCE_DIR}/tools/Linux/packaging/media/icon256x256.png RENAME ${APP_NAME_LC}.png DESTINATION ${datarootdir}/icons/hicolor/256x256/apps COMPONENT kodi) # Install docs -install(FILES ${CORE_SOURCE_DIR}/copying.txt - ${CORE_SOURCE_DIR}/LICENSE.GPL - ${CORE_SOURCE_DIR}/version.txt - ${CORE_SOURCE_DIR}/docs/README.linux +install(FILES ${CMAKE_SOURCE_DIR}/copying.txt + ${CMAKE_SOURCE_DIR}/LICENSE.GPL + ${CMAKE_SOURCE_DIR}/version.txt + ${CMAKE_SOURCE_DIR}/docs/README.linux DESTINATION ${docdir} COMPONENT kodi) -install(FILES ${CORE_SOURCE_DIR}/privacy-policy.txt +install(FILES ${CMAKE_SOURCE_DIR}/privacy-policy.txt DESTINATION ${datarootdir}/${APP_NAME_LC} COMPONENT kodi) @@ -141,127 +141,127 @@ if(NOT WITH_TEXTUREPACKER) endif() # Install kodi-addon-dev headers -install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_utils.hpp - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_adsp.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_audioengine.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_inputstream.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_peripheral.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_codec_types.h - ${CORE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h - ${CORE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h - ${CORE_SOURCE_DIR}/xbmc/input/XBMC_vkeys.h +install(FILES ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_utils.hpp + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_adsp.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_audioengine.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_inputstream.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_peripheral.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_codec_types.h + ${CMAKE_SOURCE_DIR}/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h + ${CMAKE_SOURCE_DIR}/xbmc/filesystem/IFileTypes.h + ${CMAKE_SOURCE_DIR}/xbmc/input/XBMC_vkeys.h DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-addon-dev) # Install kodi-addon-dev add-on bindings install(FILES ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/scripts/${APP_NAME}Config.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/AddonHelpers.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/AddOptions.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/ArchSetup.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/CheckCommits.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/CheckTargetPlatform.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/GenerateVersionedFiles.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/GeneratorSetup.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/HandleDepends.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/Macros.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/PrepareEnv.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/common/ProjectMacros.cmake - ${CORE_SOURCE_DIR}/project/cmake/scripts/linux/PathSetup.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/AddonHelpers.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/AddOptions.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/ArchSetup.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/CheckCommits.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/CheckTargetPlatform.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/GenerateVersionedFiles.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/GeneratorSetup.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/HandleDepends.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/Macros.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/PrepareEnv.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/common/ProjectMacros.cmake + ${CMAKE_SOURCE_DIR}/cmake/scripts/linux/PathSetup.cmake DESTINATION ${datarootdir}/${APP_NAME_LC}/cmake COMPONENT kodi-addon-dev) # Install kodi-audio-dev -install(FILES ${CORE_SOURCE_DIR}/xbmc/cores/AudioEngine/Utils/AEChannelData.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_types.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audiodec_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audiodec_types.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_audioenc_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_audioenc_types.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audioengine_types.h +install(FILES ${CMAKE_SOURCE_DIR}/xbmc/cores/AudioEngine/Utils/AEChannelData.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_adsp_types.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audiodec_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audiodec_types.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_audioenc_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_audioenc_types.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audioengine_types.h DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-audio-dev) if(ENABLE_EVENTCLIENTS) # Install kodi-eventclients-common BT python files - install(PROGRAMS ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/__init__.py - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/bt.py - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/bt/hid.py + install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/bt/__init__.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/bt/bt.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/bt/hid.py DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC}/bt COMPONENT kodi-eventclients-common) # Install kodi-eventclients-common PS3 python files - install(PROGRAMS ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/__init__.py - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/keymaps.py - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixaxis.py - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixpair.py - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixwatch.py + install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/__init__.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/keymaps.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixaxis.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixpair.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/ps3/sixwatch.py DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC}/ps3 COMPONENT kodi-eventclients-common) # Install kodi-eventclients-common python files file(WRITE ${CMAKE_BINARY_DIR}/packages/deb/defs.py ICON_PATH="usr/share/pixmaps/${APP_NAME_LC}/") install(PROGRAMS ${CMAKE_BINARY_DIR}/packages/deb/defs.py - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/__init__.py - "${CORE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py" - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/xbmcclient.py - ${CORE_SOURCE_DIR}/tools/EventClients/lib/python/zeroconf.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/__init__.py + "${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py" + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/xbmcclient.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/python/zeroconf.py DESTINATION lib/python2.7/dist-packages/${APP_NAME_LC} COMPONENT kodi-eventclients-common) # Install kodi-eventclients-common icons - install(FILES ${CORE_SOURCE_DIR}/tools/EventClients/icons/bluetooth.png - ${CORE_SOURCE_DIR}/tools/EventClients/icons/phone.png - ${CORE_SOURCE_DIR}/tools/EventClients/icons/mail.png - ${CORE_SOURCE_DIR}/tools/EventClients/icons/mouse.png + install(FILES ${CMAKE_SOURCE_DIR}/tools/EventClients/icons/bluetooth.png + ${CMAKE_SOURCE_DIR}/tools/EventClients/icons/phone.png + ${CMAKE_SOURCE_DIR}/tools/EventClients/icons/mail.png + ${CMAKE_SOURCE_DIR}/tools/EventClients/icons/mouse.png DESTINATION ${datarootdir}/pixmaps/${APP_NAME_LC} COMPONENT kodi-eventclients-common) # Install kodi-eventclients-dev headers - install(FILES ${CORE_SOURCE_DIR}/tools/EventClients/lib/c++/xbmcclient.h + install(FILES ${CMAKE_SOURCE_DIR}/tools/EventClients/lib/c++/xbmcclient.h DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-eventclients-dev) # Install kodi-eventclients-dev C# examples - install(FILES "${CORE_SOURCE_DIR}/tools/EventClients/examples/c#/XBMCDemoClient1.cs" + install(FILES "${CMAKE_SOURCE_DIR}/tools/EventClients/examples/c#/XBMCDemoClient1.cs" DESTINATION "${docdir}/${APP_NAME_LC}-eventclients-dev/examples/C#" COMPONENT kodi-eventclients-dev) # Install kodi-eventclients-dev C++ examples - install(FILES ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_notification.cpp - ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_log.cpp - ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_button1.cpp - ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_mouse.cpp - ${CORE_SOURCE_DIR}/tools/EventClients/examples/c++/example_button2.cpp + install(FILES ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/c++/example_notification.cpp + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/c++/example_log.cpp + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/c++/example_button1.cpp + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/c++/example_mouse.cpp + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/c++/example_button2.cpp DESTINATION ${docdir}/${APP_NAME_LC}-eventclients-dev/examples/C++ COMPONENT kodi-eventclients-dev) # Install kodi-eventclients-dev java examples - install(FILES ${CORE_SOURCE_DIR}/tools/EventClients/examples/java/XBMCDemoClient1.java + install(FILES ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/java/XBMCDemoClient1.java DESTINATION ${docdir}/${APP_NAME_LC}-eventclients-dev/examples/java COMPONENT kodi-eventclients-dev) # Install kodi-eventclients-dev python examples - install(PROGRAMS ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_mouse.py - ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_button1.py - ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_notification.py - ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_action.py - ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_button2.py - ${CORE_SOURCE_DIR}/tools/EventClients/examples/python/example_simple.py + install(PROGRAMS ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/python/example_mouse.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/python/example_button1.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/python/example_notification.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/python/example_action.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/python/example_button2.py + ${CMAKE_SOURCE_DIR}/tools/EventClients/examples/python/example_simple.py DESTINATION ${docdir}/${APP_NAME_LC}-eventclients-dev/examples/python COMPONENT kodi-eventclients-dev) # Install kodi-eventclients-ps3 - install(PROGRAMS "${CORE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py" + install(PROGRAMS "${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py" RENAME ${APP_NAME_LC}-ps3remote DESTINATION ${bindir} COMPONENT kodi-eventclients-ps3) @@ -272,51 +272,50 @@ if(ENABLE_EVENTCLIENTS) COMPONENT kodi-eventclients-wiiremote) # Install kodi-eventclients-xbmc-send - install(PROGRAMS "${CORE_SOURCE_DIR}/tools/EventClients/Clients/Kodi Send/kodi-send.py" + install(PROGRAMS "${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/Kodi Send/kodi-send.py" RENAME ${APP_NAME_LC}-send DESTINATION ${bindir} COMPONENT kodi-eventclients-xbmc-send) endif() # Install kodi-inputstream-dev -install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h +install(FILES ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_inputstream_types.h DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-inputstream-dev) # Install kodi-pvr-dev -install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h +install(FILES ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-pvr-dev) # Install kodi-screensaver-dev -install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_types.h +install(FILES ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_types.h DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-screensaver-dev) # Install kodi-visualization-dev -install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_vis_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_vis_types.h +install(FILES ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_vis_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_vis_types.h DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-visualization-dev) # Install kodi-peripheral-dev -install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_types.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_utils.hpp +install(FILES ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_types.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_utils.hpp DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-peripheral-dev) # Install kodi-game-dev -install(FILES ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h - ${CORE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h +install(FILES ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h + ${CMAKE_SOURCE_DIR}/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h DESTINATION ${includedir}/${APP_NAME_LC} COMPONENT kodi-game-dev) - # Install XBT skin files foreach(texture ${XBT_FILES}) string(REPLACE "${CMAKE_BINARY_DIR}/" "" dir ${texture}) @@ -355,7 +354,7 @@ if(CPACK_GENERATOR) if(CMAKE_BUILD_TYPE STREQUAL Debug) message(STATUS "DEB Generator: Build type is set to 'Debug'. Packaged binaries will be unstripped.") endif() - include(${PROJECT_SOURCE_DIR}/cpack/CPackConfigDEB.cmake) + include(${CMAKE_SOURCE_DIR}/cmake/cpack/CPackConfigDEB.cmake) else() message(FATAL_ERROR "DEB Generator: Can't configure CPack to generate Debian packages on non-linux systems.") endif() diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake index 30478636e6..6d43c4ee54 100644 --- a/cmake/scripts/osx/ArchSetup.cmake +++ b/cmake/scripts/osx/ArchSetup.cmake @@ -1,10 +1,10 @@ if(NOT CMAKE_TOOLCHAIN_FILE) - message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for osx. See ${PROJECT_SOURCE_DIR}/README.md") + message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for osx. See ${CMAKE_SOURCE_DIR}/cmake/README.md") endif() -set(CORE_MAIN_SOURCE ${CORE_SOURCE_DIR}/xbmc/platform/posix/main.cpp - ${CORE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.mm - ${CORE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.h) +set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/posix/main.cpp + ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.mm + ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDLMain.h) set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX) set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_DEFINED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE diff --git a/cmake/scripts/osx/ExtraTargets.cmake b/cmake/scripts/osx/ExtraTargets.cmake index ed9c089144..28c1e742f7 100644 --- a/cmake/scripts/osx/ExtraTargets.cmake +++ b/cmake/scripts/osx/ExtraTargets.cmake @@ -1,3 +1,3 @@ # XBMCHelper -add_subdirectory(${CORE_SOURCE_DIR}/tools/EventClients/Clients/OSXRemote build/XBMCHelper) +add_subdirectory(${CMAKE_SOURCE_DIR}/tools/EventClients/Clients/OSXRemote build/XBMCHelper) add_dependencies(${APP_NAME_LC} XBMCHelper) diff --git a/cmake/scripts/osx/Install.cmake b/cmake/scripts/osx/Install.cmake index 3924ccf032..77c771c9e1 100644 --- a/cmake/scripts/osx/Install.cmake +++ b/cmake/scripts/osx/Install.cmake @@ -2,7 +2,7 @@ set(PACKAGE_OUTPUT_DIR ${CMAKE_BINARY_DIR}/build/${CORE_BUILD_CONFIG}) -configure_file(${CORE_SOURCE_DIR}/xbmc/platform/darwin/osx/Info.plist.in +configure_file(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/Info.plist.in ${CMAKE_BINARY_DIR}/xbmc/platform/darwin/osx/Info.plist @ONLY) execute_process(COMMAND perl -p -i -e "s/r####/${APP_SCMID}/" ${CMAKE_BINARY_DIR}/xbmc/platform/darwin/osx/Info.plist) @@ -15,24 +15,24 @@ add_custom_target(bundle "TARGET_NAME=${APP_NAME}.app" "APP_NAME=${APP_NAME}" "SRCROOT=${CMAKE_BINARY_DIR}" - ${CORE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-osx.command + ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-osx.command COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" "TARGET_BUILD_DIR=${PACKAGE_OUTPUT_DIR}" "TARGET_NAME=${APP_NAME}.app" "APP_NAME=${APP_NAME}" "FULL_PRODUCT_NAME=${APP_NAME}.app" "SRCROOT=${CMAKE_BINARY_DIR}" - ${CORE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-osx.command) + ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-osx.command) set_target_properties(bundle PROPERTIES FOLDER "Build Utilities") add_dependencies(bundle ${APP_NAME_LC}) -configure_file(${CORE_SOURCE_DIR}/tools/darwin/packaging/osx/mkdmg-osx.sh.in +configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/osx/mkdmg-osx.sh.in ${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx/mkdmg-osx.sh @ONLY) add_custom_target(dmg - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CORE_SOURCE_DIR}/tools/darwin/packaging/osx/ + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/osx/ ${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx/ - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CORE_SOURCE_DIR}/tools/darwin/packaging/media/osx/ + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/osx/ ${CMAKE_BINARY_DIR}/tools/darwin/packaging/media/osx/ COMMAND ./mkdmg-osx.sh ${CORE_BUILD_CONFIG} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx) diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake index d1c81a2541..aca803e2fa 100644 --- a/cmake/scripts/windows/ArchSetup.cmake +++ b/cmake/scripts/windows/ArchSetup.cmake @@ -11,12 +11,12 @@ set(PLATFORM_DIR platform/win32) set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs) set(CMAKE_SYSTEM_NAME Windows) -list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32) -list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg) -list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin) -list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${PROJECT_SOURCE_DIR}/../BuildDependencies) +list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/lib/win32) +list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg) +list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin) +list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies) -set(PYTHON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/../BuildDependencies/include/python) +set(PYTHON_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/include/python) # -------- Compiler options --------- @@ -44,8 +44,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") # For #pragma comment(lib X) # TODO: It would certainly be better to handle these libraries via CMake modules. -link_directories(${PROJECT_SOURCE_DIR}/../../lib/win32/ffmpeg/bin - ${PROJECT_SOURCE_DIR}/../BuildDependencies/lib) +link_directories(${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin + ${CMAKE_SOURCE_DIR}/project/BuildDependencies/lib) # Additional libraries list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib |