serenity/Toolchain/CMakeToolchain.txt
Robin Burchell 5babcac289 Build: Install most headers to Root (and libcore.a/libgui.a)
This makes out-of-tree linking possible. And at the same time, add a
CMakeToolchain.txt file that can be used to build arbitrary cmake-using
applications on Serenity by pointing to the CMAKE_TOOLCHAIN_FILE when
running cmake:

    -DCMAKE_TOOLCHAIN_FILE=~/code/serenity/Toolchain/CMakeToolchain.txt
2019-05-17 21:59:48 +02:00

20 lines
605 B
Plaintext

set(CMAKE_SYSTEM_NAME Generic)
if (NOT DEFINED ENV{SERENITY_ROOT})
message(FATAL_ERROR "SERENITY_ROOT not set. Please source Toolchain/UseIt.sh.")
endif()
# where to read from/write to
set(CMAKE_SYSROOT $ENV{SERENITY_ROOT}/Root)
set(CMAKE_STAGING_PREFIX $ENV{SERENITY_ROOT}/Root)
set(CMAKE_INSTALL_PREFIX $ENV{SERENITY_ROOT}/Root)
set(CMAKE_C_COMPILER i686-pc-serenity-gcc)
set(CMAKE_CXX_COMPILER i686-pc-serenity-g++)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)