ADVobjuscator is a header-only C++ library that integrates cleanly with CMake. There are several possibilities to install and use it:
find_packageFetchContent in CMakeIf you don’t use CMake or prefer to copy files manually:
include/ folderCopy the include/advobfuscator/ directory into your own
project’s include/ folder.
#include "advobfuscator/obfuscate.h"Make sure your compiler includes the path:
g++ -Iinclude myapp.cpp
If you are using CMake, here is an example of
CMakeFiles.txt:
cmake_minimum_required(VERSION 3.14)
project(myproject LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(myapp src/main.cpp)
# Add the path to the manually downloaded headers
target_include_directories(myapp PRIVATE ${CMAKE_SOURCE_DIR}/include)find_packagegit clone https://github.com/yourusername/advobfuscator.git
cd advobfuscator
cmake -B build -DCMAKE_INSTALL_PREFIX=/your/install/prefix
cmake --build build --target install
Replace /your/install/prefix with the desired install
location (e.g., /usr/local or a custom path).
cmake_minimum_required(VERSION 3.14)
project(myproject)
# Add path to CMAKE_PREFIX_PATH if not system-installed
list(APPEND CMAKE_PREFIX_PATH "/your/install/prefix")
find_package(advobfuscator REQUIRED)
add_executable(myapp main.cpp)
target_link_libraries(myapp PRIVATE advobfuscator::advobfuscator)git submodule add https://github.com/andrivet/advobfuscator.git external/advobfuscator
add_subdirectory(external/advobfuscator)
add_executable(myapp main.cpp)
target_link_libraries(myapp PRIVATE advobfuscator::advobfuscator)If you want CMake (3.14 or higher) to automatically fetch and integrate ADVObfuscator:
include(FetchContent)
FetchContent_Declare(
advobfuscator
GIT_REPOSITORY https://github.com/andrivet/advobfuscator.git
GIT_TAG v2.0 # Or use a branch or commit hash
)
FetchContent_MakeAvailable(advobfuscator)
add_executable(myapp main.cpp)
target_link_libraries(myapp PRIVATE advobfuscator::advobfuscator)