diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cba116d9..9954c941 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,22 +47,6 @@ jobs: with: submodules: true - # Download inklecate - - uses: suisei-cn/actions-download-file@v1.6.0 - name: Download Inklecate - id: download_inklecate - with: - url: ${{ matrix.inklecate_url }} - target: "inklecate/" - - # Install Inklecate - - name: Deploy Inkelcate - shell: bash - run: | - cd inklecate - unzip *.zip - echo "INKLECATE=${{ matrix.inklecate_pre }}$GITHUB_WORKSPACE/inklecate/inklecate${{ matrix.inklecate_post }}" >> $GITHUB_ENV - # Setup python - uses: actions/setup-python@v5 if: ${{ matrix.proof }} @@ -83,7 +67,7 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{github.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DINKCPP_PY=OFF -DINKCPP_C=ON + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DINKCPP_PY=OFF -DINKCPP_C=ON -DINKCPP_TEST=ON -DINKCPP_INKLECATE=OS # Build using CMake and OS toolkit - name: Build diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a15a36b..c984ddee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,26 @@ cmake_minimum_required(VERSION 3.16) +if(${CMAKE_VERSION} VERSION_GREATER "3.24.0") + cmake_policy(SET CMP0135 NEW) +endif() +include(FetchContent) +FetchContent_Declare(inklecate_mac +URL https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_mac.zip +URL_HASH SHA256=c516402bca5fa249a7712e62591b048b137eba3098c53f9fb85a4253f9b9e2c0 +SOURCE_DIR "inklecate/mac" +) +FetchContent_Declare(inklecate_windows +URL https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_windows.zip +URL_HASH SHA256=6f317cb4c59bf1b31c6dd61e80c6a2287a1d8c241a703f0586f736ae00871aab +SOURCE_DIR "inklecate/windows" +) +FetchContent_Declare(inklecate_linux +URL https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_linux.zip +URL_HASH SHA256=26f4e188e02536d6e99e73e71d9b13e2c2144187f1368a87e82fd5066176cff8 +SOURCE_DIR "inklecate/linux" +) +set(FETCHCONTENT_QUIET OFF) +set(CMAKE_TLS_VERIFY true) # Testing enabled enable_testing() @@ -14,6 +35,25 @@ SET(CMAKE_INSTALL_INCLUDE_DIR include) set(INKCPP_PY OFF CACHE BOOL "Build python bindings") set(WHEEL_BUILD OFF CACHE BOOL "Set for build wheel python lib (do not forgett INKCPP_PY") set(INKCPP_C OFF CACHE BOOL "Build c library") +set(INKCPP_TEST OFF CACHE BOOL "Build inkcpp tests (requires: inklecate in path / env: INKLECATE set / INKCPP_INKLECATE=OS or ALL)") +set(INKCPP_INKLECATE "NONE" CACHE STRING "If inklecate should be downloaded automatically from the official release page. NONE -> No, OS -> Yes, but only for the current OS, ALL -> Yes, for all availible OSs") +set_property(CACHE INKCPP_INKLECATE PROPERTY STRINGS "NONE" "OS" "ALL") +set(INKCPP_DOC_BlueprintUE ON CACHE BOOL "Building doxygen documentation with BlueprintUE visualisation for unreal blueprints.") + +string(TOUPPER "${INKCPP_INKLECATE}" inkcpp_inklecate_upper) +if (inkcpp_inklecate_upper STREQUAL "ALL") + FetchContent_MakeAvailable(inklecate_windows inklecate_mac inklecate_linux) +elseif(inkcpp_inklecate_upper STREQUAL "OS") + if(UNIX AND NOT APPLE) + FetchContent_MakeAvailable(inklecate_linux) + elseif(APPLE) + FetchContent_MakeAvailable(inklecate_mac) + elseif(MSYS OR MINGW OR WIN32 OR CYGWIN) + FetchContent_MakeAvailable(inklecate_windows) + else() + message(FATAL_ERROR "Unable to identify OS for option INKCPP_INKLECATE=OS, please consider using NONE or ALL.") + endif() +endif() if (INKCPP_PY) add_compile_options(-fPIC) @@ -27,7 +67,9 @@ if (INKCPP_C) endif(INKCPP_C) if (NOT WHEEL_BUILD) add_subdirectory(inkcpp_cl) - add_subdirectory(inkcpp_test) + if(INKCPP_TEST) + add_subdirectory(inkcpp_test) + endif(INKCPP_TEST) add_subdirectory(unreal) endif(NOT WHEEL_BUILD) diff --git a/Documentation/cmake_example.zip b/Documentation/cmake_example.zip index 262bcee6..3fbbc6cd 100644 Binary files a/Documentation/cmake_example.zip and b/Documentation/cmake_example.zip differ diff --git a/Documentation/cmake_example/CMakeLists.txt b/Documentation/cmake_example/CMakeLists.txt index f8baba56..59cf0570 100644 --- a/Documentation/cmake_example/CMakeLists.txt +++ b/Documentation/cmake_example/CMakeLists.txt @@ -5,6 +5,7 @@ find_package(inkcpp CONFIG REQUIRED) # for CXX builds add_executable(main_cpp main.cpp) +set_property(TARGET main_cpp PROPERTY CXX_STANDARD 20) target_link_libraries(main_cpp inkcpp inkcpp_compiler) # for C builds diff --git a/README.md b/README.md index 86f00fa2..4a4238c9 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Doxygen Documentation: https://jbenda.github.io/inkcpp/html Run `inkcpp_cl.exe -p myfile.json` to execute a compiled Ink JSON file in play mode. It can also operate on `.ink` files but `inklecate.exe` must be in the same folder or in the PATH. `inklecate` can be downloaded from the [official release page](https://github.com/inkle/ink/releases) and will be downloaded from CMake at configure time (located at `build/unreal/inkcpp/Resources/inklecate`). +Or do it automatically with the `INKCPP_INKLECATE=OS` CMake flag. (It will be downloaded to `/inklecate//` and will be installed with `cmake --install . --component cl`) Without the `-p` flag, it'll just compile the JSON/Ink file into InkCPP's binary format (see the Wiki on GitHub). @@ -129,6 +130,7 @@ To build, either run the generated buildfiles OR you can use `cmake --build . -- To install the different components use `cmake --install . --component ` + `lib` C++ library to link against ++ `clib` C library to link against + `cl` command line application + `unreal` UE-plugin @@ -142,7 +144,29 @@ If you recieve an error like "Mismatch Detected for Runtime Library," it means y ### Running Tests -Run `ctest` from the build folder to execute unit tests configured with CMake. Use `ctest -V` for more verbose error output. +To enable testing set the CMake flag `INKCPP_TEST=ON`. If you do not have inklecate at your path you can set `INKCPP_INKLECATE=OS` to download und use the current supported verision. +Run `ctest -C Release` from the build folder to execute unit tests configured with CMake. Use `ctest -V -Release` for more verbose error output. +Do not forgett that the C libs are only testet if `INKCPP_C=ON` is set. + +```sh +mkdir build; cd build +cmake .. -DCMAKE_BUILD_TYPE=Release -DINKCPP_TEST=ON -DINKCPP_INKLECATE=OS +cmake --build . --config Release +ctest -C Release +``` + +To test the python bindings use: + +```sh +pip install . +python -m pip install build pytest +python -m build +python -m pip install dist/*.whl --user +# if inklecate is not in the same directory / inside Path set INKLECATE enviroment variable +export INKLECATE= # unix +set INKLECTATE= # windows +python -m pytest +``` Right now this only executes the internal unit tests which test the functions of particular classes. Soon it'll run more complex tests on .ink files using ink-proof. @@ -155,7 +179,7 @@ To build it from source use: ```sh git clone --recurse-submodules https://github.com/JBenda/inkcpp.git -pip install inkcpp +pip install . ``` The python bindnigs are defined in `inkcpp_py` subfolder. diff --git a/inkcpp/include/story.h b/inkcpp/include/story.h index 913af286..f1a20def 100644 --- a/inkcpp/include/story.h +++ b/inkcpp/include/story.h @@ -127,11 +127,12 @@ class story * `linux-lib.zip`).
to link the libraries you can use `find_package(inkcpp CONFIG)` which * provides two targets: * + inkcpp: the runtime enviroment - * + inkcpp_comopiler: functionality to compile a story.json to story.bin + * + inkcpp_compiler: functionality to compile a story.json to story.bin * * To run your own `.ink` files you need a way to compile it to inks runtime format `.ink.json`. One * way is to use `inklecate .ink`.
Which is available at the [official release * page](https://github.com/inkle/ink/releases/latest).
+ * Alternativly set the enviroment variable `INKLECATE` so that `%INKLECATE%` executes inklecate. * * If you want to use the inkcpp with C link against the target inkcpp_c and `#include * ` The C-API documentation and example can be found @ref clib "here". @@ -143,12 +144,29 @@ class story * ls # expected output: CMakeLists.txt main.cpp test.ink test.ink.json linux-lib * mkdir build * cd build - * inkcpp_DIR=../linux-lib cmake .. - * cmake --build . - * cp ../test.ink.json . - * ./main_cpp + * inkcpp_DIR=../linux-lib cmake .. -DCMAKE_BUILD_TYPE=Release # linux + * set inkcpp_DIR=../win64-lib # windows + * cmake .. # windows + * cmake --build . --config=Release + * cd .. + * ./build/main_cpp # exact path depends on build system + * used * @endcode * + * @subsection cmake_flags CMake Flags + * + INKCPP_TEST: (ON|OFF) weather or not execute tests + * requires `inklecate` to be in the PATH or `INKCPP_INKLECATE=OS` or `=ALL` + * + INKCPP_INKLECATE: (NONE|OS|ALL) download the current supported inklecate version from the + * official [release page](https://github.com/inkle/ink/releases/latest)
They are stored at + * `/inklecate//` and will be automatcilly used for the tests + * + NONE: disable this function + * + OS: only the version supported for the OS + * + ALL: all versions + * + INKCPP_C: (ON|OFF) Build the inkcpp c bindings (and thest them if test is enabled) + * + INKCPP_PY: (ON|OFF) Build python bindings (build system only) + * + WHEEL_BUILD: (ON|OFF) Settings to work with a python wheel build (build system only) + * + INKCPP_DOC_BlueprintUE: (ON|OFF) enables nice blueprint renders for the documentation + * * @subsection src_main main.cpp * @include cmake_example/main.cpp * @@ -161,15 +179,17 @@ class story * * @section ue Unreal Installation * - * The current release is available at the [release + * The easiest way is to install it via the [unreal + * marcetplace](https://www.unrealengine.com/marketplace/en-US/product/inkcpp). The overview to the + * UE Blueprint class and examples can be found at @ref unreal "here". + * + * The current release is also available at the [release * page](https://github.com/JBenda/inkcpp/releases/latest), as `unreal.zip`.
* Unpack this foldor in `/PATH/TO/UNREAL_ENGINE/Engine/Plugins/` and it will be available * as plugin in the plugin list.
* Or unpack this folder in `/PATH/TO/UNREAL_PROJECT/Plugins/` and it will be * intigrated at the next startup.
A MarketPlace appearance is work in progress :) * - * The overview to the UE Blueprint class and examples can be found at @ref unreal "here". - * * If you want to use the newest version clone the project and install the unreal component. * @code {sh} * git clone https://github.com/JBenda/inkcpp diff --git a/inkcpp_cl/CMakeLists.txt b/inkcpp_cl/CMakeLists.txt index 5483a05d..eea6a759 100644 --- a/inkcpp_cl/CMakeLists.txt +++ b/inkcpp_cl/CMakeLists.txt @@ -17,3 +17,33 @@ endif() # Install install(TARGETS inkcpp_cl DESTINATION . COMPONENT cl EXCLUDE_FROM_ALL) +string(TOUPPER "${INKCPP_INKLECATE}" inkcpp_inklecate_upper) +unset(inklecate_dir) +if((inkcpp_inklecate_upper STREQUAL "ALL") OR (inkcpp_inklecate_upper STREQUAL "OS")) + if(UNIX AND NOT APPLE) + FetchContent_GetProperties(inklecate_linux) + if(inklecate_linux_POPULATED) + set(inklecate_dir "${inklecate_linux_SOURCE_DIR}") + else() + message(WARNING "Inklecate for this OS was not downloaded successfully, and will therfore not be packat with cl") + endif(inklecate_linux_POPULATED) + elseif(APPLE) + if(inklecate_mac_POPULATED) + set(inklecate_dir "${inklecate_mac_SOURCE_DIR}") + else() + message(WARNING "Inklecate for this OS was not downloaded successfully, and will therfore not be packat with cl") + endif(inklecate_mac_POPULATED) + elseif(MSYS OR MINGW OR WIN32 OR CYGWIN) + if(inklecate_windows_POPULATED) + set(inklecate_dir "${inklecate_windows_SOURCE_DIR}") + else() + message(WARNING "Inklecate for this OS was not downloaded successfully, and will therfore not be packat with cl") + endif(inklecate_windows_POPULATED) + else() + message(WARNING "Failed to determine OS for bundling inklecate with command line application!") + endif() + if(inklecate_dir) + file(GLOB inklecate_files "${inklecate_dir}/*") + install(FILES ${inklecate_files} DESTINATION . COMPONENT cl EXCLUDE_FROM_ALL) + endif(inklecate_dir) +endif((inkcpp_inklecate_upper STREQUAL "ALL") OR (inkcpp_inklecate_upper STREQUAL "OS")) diff --git a/inkcpp_cl/inkcpp_cl.cpp b/inkcpp_cl/inkcpp_cl.cpp index 521a46f6..01ef40f2 100644 --- a/inkcpp_cl/inkcpp_cl.cpp +++ b/inkcpp_cl/inkcpp_cl.cpp @@ -23,6 +23,7 @@ void usage() "snapshot file enter '-1' as choice\n" << "\t--ommit-choice-tags:\tdo not print tags after choices, primarly used to be compatible " "with inkclecat output" + << "\t--inklecate :\toverwrites INKLECATE enviroment variable\n" << endl; } @@ -38,6 +39,7 @@ int main(int argc, const char** argv) std::string outputFilename; bool playMode = false, testMode = false, testDirectory = false, ommit_choice_tags = false; std::string snapshotFile; + const char* inklecateOverwrite = nullptr; for (int i = 1; i < argc - 1; i++) { std::string option = argv[i]; if (option == "-o") { @@ -56,6 +58,11 @@ int main(int argc, const char** argv) } else if (option == "-td") { testMode = true; testDirectory = true; + } else if (option == "--inklecate") { + if (i + 1 < argc - 1 && argv[i + 1][0] != '-') { + ++i; + inklecateOverwrite = argv[i]; + } } else { std::cerr << "Unrecognized option: '" << option << "'\n"; } @@ -65,16 +72,16 @@ int main(int argc, const char** argv) std::string inputFilename = argv[argc - 1]; // Test mode - if (testMode) { - bool result; - if (testDirectory) { - result = test_directory(inputFilename); - } else { - result = test(inputFilename); - } + // if (testMode) { + // bool result; + // if (testDirectory) { + // result = test_directory(inputFilename); + // } else { + // result = test(inputFilename); + // } - return result ? 0 : -1; - } + // return result ? 0 : -1; + // } // If output filename not specified, use input filename as guideline if (outputFilename.empty()) { @@ -90,7 +97,7 @@ int main(int argc, const char** argv) // Then we need to do a compilation with inklecate try { - inklecate(inputFilename, jsonFile); + inklecate(inputFilename, jsonFile, inklecateOverwrite); } catch (const std::exception& e) { std::cerr << "Inklecate Error: " << e.what() << std::endl; return 1; diff --git a/inkcpp_cl/test.cpp b/inkcpp_cl/test.cpp index d69e0973..00468a49 100644 --- a/inkcpp_cl/test.cpp +++ b/inkcpp_cl/test.cpp @@ -12,10 +12,21 @@ #include #include -void inklecate(const std::string& inkFilename, const std::string& jsonFilename) +void inklecate( + const std::string& inkFilename, const std::string& jsonFilename, const char* inklecateOverwrite +) { // Get environment specific inklecate invocation command - const char* inklecateCmd = std::getenv("INKLECATE"); + + const char* inklecateCmd = nullptr; + if (inklecateCmd == nullptr) { + if (inklecateOverwrite) { + inklecateCmd = inklecateOverwrite; + } + } + if (inklecateCmd == nullptr) { + std::getenv("INKLECATE"); + } if (inklecateCmd == nullptr) inklecateCmd = "inklecate"; @@ -55,7 +66,7 @@ bool test(const std::string& inkFilename) std::cout << std::filesystem::path(inkFilename).filename().string() << std::endl; // Compile into a temporary json file - inklecate(inkFilename, "test.tmp"); + inklecate(inkFilename, "test.tmp", nullptr); // Compile into binary ink::compiler::compilation_results results; diff --git a/inkcpp_cl/test.h b/inkcpp_cl/test.h index ffca4315..d4c50344 100644 --- a/inkcpp_cl/test.h +++ b/inkcpp_cl/test.h @@ -1,5 +1,8 @@ #include -void inklecate(const std::string& inkFilename, const std::string& jsonFilename); -bool test(const std::string& inkFilename); -bool test_directory(const std::string& directory); \ No newline at end of file +void inklecate( + const std::string& inkFilename, const std::string& jsonFilename, const char* inkclecateOverwrite +); +// TODO: reevaluate in ink file test mechanism +// bool test(const std::string& inkFilename); +// bool test_directory(const std::string& directory); diff --git a/inkcpp_test/CMakeLists.txt b/inkcpp_test/CMakeLists.txt index 4a36268d..4568eee7 100644 --- a/inkcpp_test/CMakeLists.txt +++ b/inkcpp_test/CMakeLists.txt @@ -44,6 +44,39 @@ else() set(INKLECATE_CMD "inklecate") endif() +string(TOUPPER "${INKCPP_INKLECATE}" inkcpp_inklecate_upper) +if((inkcpp_inklecate_upper STREQUAL "ALL") OR (inkcpp_inklecate_upper STREQUAL "OS")) + if(UNIX AND NOT APPLE) + FetchContent_GetProperties(inklecate_linux) + if(inklecate_linux_POPULATED) + set(INKLECATE_CMD "${inklecate_linux_SOURCE_DIR}/inklecate") + else() + message(FATAL_ERROR "inklecate download is not provided, please check if the download failed. + You may set INCPP_INKLECATE=NONE and provide inkcleate via your PATH or the INKLECATE enviroment variable. + You can also disable tests altogether by setting INKCPP_TEST=OFF") + endif(inklecate_linux_POPULATED) + elseif(APPLE) + if(inklecate_mac_POPULATED) + set(INKLECATE_CMD "${inklecate_mac_SOURCE_DIR}/inklecate") + else() + message(FATAL_ERROR "inklecate download is not provided, please check if the download failed. + You may set INCPP_INKLECATE=NONE and provide inkcleate via your PATH or the INKLECATE enviroment variable. + You can also disable tests altogether by setting INKCPP_TEST=OFF") + endif(inklecate_mac_POPULATED) + elseif(MSYS OR MINGW OR WIN32 OR CYGWIN) + if(inklecate_windows_POPULATED) + set(INKLECATE_CMD "${inklecate_windows_SOURCE_DIR}/inklecate") + else() + message(FATAL_ERROR "inklecate download is not provided, please check if the download failed. + You may set INCPP_INKLECATE=NONE and provide inkcleate via your PATH or the INKLECATE enviroment variable. + You can also disable tests altogether by setting INKCPP_TEST=OFF") + endif(inklecate_windows_POPULATED) + else() + message(FATAL_ERROR "Current os could not be identified, therfore inklecate must be provided explicit for the tests to work + please set INKCPP_INKLECATE=NONE and provide inklecate via your PATH or the INKLECATE enviroment variables. + Alternatily disable tests by setting INKCPP_TEST=OFF.") + endif() +endif((inkcpp_inklecate_upper STREQUAL "ALL") OR (inkcpp_inklecate_upper STREQUAL "OS")) set(INK_TEST_RESOURCE_DIR "${PROJECT_BINARY_DIR}/ink") file(MAKE_DIRECTORY "${INK_TEST_RESOURCE_DIR}") @@ -60,7 +93,7 @@ foreach(INK_FILE IN LISTS INK_FILES) set(output "${INK_TEST_RESOURCE_DIR}/${INK_FILENAME}.bin") add_custom_command( OUTPUT ${output} - COMMAND $ -o "${output}" "${INK_FILE}" + COMMAND $ -o "${output}" --inklecate "${INKLECATE_CMD}" "${INK_FILE}" DEPENDS ${INK_FILE} COMMENT "Compile test ink file '${INK_FILENAME}.ink' -> '${output}'" ) diff --git a/unreal/CMakeLists.txt b/unreal/CMakeLists.txt index 80183726..9805e548 100644 --- a/unreal/CMakeLists.txt +++ b/unreal/CMakeLists.txt @@ -1,56 +1,51 @@ -if(${CMAKE_VERSION} VERSION_GREATER "3.24.0") - cmake_policy(SET CMP0135 NEW) -endif() +# download inklecate for unreal plugin +install(CODE " include(FetchContent) -set(CMAKE_TLS_VERIFY true) -FetchContent_Declare(inklecate_mac +FetchContent_Populate(inklecate_mac URL https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_mac.zip URL_HASH SHA256=c516402bca5fa249a7712e62591b048b137eba3098c53f9fb85a4253f9b9e2c0 -SOURCE_DIR "inkcpp/Source/ThirdParty/inklecate/mac" +SOURCE_DIR \"inklecate/mac\" +SUBBUILD_DIR \"${CMAKE_CURRENT_BINARY_DIR}/../_deps/inklecate_mac-subbuild\" ) -FetchContent_Declare(inklecate_windows +FetchContent_Populate(inklecate_windows URL https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_windows.zip URL_HASH SHA256=6f317cb4c59bf1b31c6dd61e80c6a2287a1d8c241a703f0586f736ae00871aab -SOURCE_DIR "inkcpp/Source/ThirdParty/inklecate/windows" +SOURCE_DIR \"inklecate/windows\" +SUBBUILD_DIR \"${CMAKE_CURRENT_BINARY_DIR}/../_deps/inklecate_windows-subbuild\" ) -FetchContent_Declare(inklecate_linux +FetchContent_Populate(inklecate_linux URL https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_linux.zip URL_HASH SHA256=26f4e188e02536d6e99e73e71d9b13e2c2144187f1368a87e82fd5066176cff8 -SOURCE_DIR "inkcpp/Source/ThirdParty/inklecate/linux" +SOURCE_DIR \"inklecate/linux\" +SUBBUILD_DIR \"${CMAKE_CURRENT_BINARY_DIR}/../_deps/inklecate_linux-subbuild\" ) - set(FETCHCONTENT_QUIET OFF) - -FetchContent_MakeAvailable(inklecate_windows) +set(CMAKE_TLS_VERIFY true) if(NOT inklecate_windows_SOURCE_DIR) -message(WARNING "failed to download inklecate for windows, " - "the unreal plugin will be unable use a .ink file as asset directly") +message(WARNING \"failed to download inklecate for windows, \" + \"the unreal plugin will be unable use a .ink file as asset directly\") else() -set(INKLECATE_CMD_WIN "Source/ThirdParty/inklecate/windows/inklecate.exe") +set(INKLECATE_CMD_WIN \"Source/ThirdParty/inklecate/windows/inklecate.exe\") endif() - -FetchContent_MakeAvailable(inklecate_mac) if(NOT inklecate_mac_SOURCE_DIR) - message(WARNING "failed to download inklecate for MacOS, " - "the unreal plugin will be unable use a .ink file as asset directly") + message(WARNING \"failed to download inklecate for MacOS, \" + \"the unreal plugin will be unable use a .ink file as asset directly\") else() -set(INKLECATE_CMD_MAC "Source/ThirdParty/inklecate/mac/inklecate") +set(INKLECATE_CMD_MAC \"Source/ThirdParty/inklecate/mac/inklecate\") endif() - -FetchContent_MakeAvailable(inklecate_linux) if(NOT inklecate_linux_SOURCE_DIR) - message(WARNING "failed to download inklecate for linux, " - "the unreal plugin will be unable use a .ink file as asset directly") + message(WARNING \"failed to download inklecate for linux, \" + \"the unreal plugin will be unable use a .ink file as asset directly\") else() -set(INKLECATE_CMD_LINUX "Source/ThirdParty/inklecate/linux/inklecate") +set(INKLECATE_CMD_LINUX \"Source/ThirdParty/inklecate/linux/inklecate\") endif() - configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/inkcpp/Source/inkcpp_editor/Private/inklecate_cmd.cpp.in" - "${CMAKE_CURRENT_BINARY_DIR}/inkcpp/Source/inkcpp_editor/Private/inklecate_cmd.cpp" + \"${CMAKE_CURRENT_SOURCE_DIR}/inkcpp/Source/inkcpp_editor/Private/inklecate_cmd.cpp.in\" + \"${CMAKE_CURRENT_BINARY_DIR}/inkcpp/Source/inkcpp_editor/Private/inklecate_cmd.cpp\" ) - +" COMPONENT unreal EXCLUDE_FROM_ALL) # Copy files into destination directory install(DIRECTORY "inkcpp/" DESTINATION "inkcpp" COMPONENT unreal EXCLUDE_FROM_ALL PATTERN "*.in" EXCLUDE) +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../inklecate" DESTINATION "inkcpp/Source/ThirdParty" COMPONENT unreal EXCLUDE_FROM_ALL) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/inkcpp" DESTINATION "." COMPONENT unreal EXCLUDE_FROM_ALL)