Update for better comp
This commit is contained in:
parent
6a6c3ed1cf
commit
4019766d8d
@ -1,14 +1,57 @@
|
|||||||
cmake_minimum_required(VERSION 3.22)
|
cmake_minimum_required(VERSION 3.22)
|
||||||
|
|
||||||
project(picasso)
|
project(picasso VERSION 0.5.2 LANGUAGES CXX DESCRIPTION "Picasso Shadercompiler on the Nintendo 3ds")
|
||||||
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-L${DEVKITPRO}/libctru/lib -L${DEVKITPRO}/picaGL/lib -L${DEVKITPRO}/portlibs/3ds/lib -specs=3dsx.specs -Wl,--gc-sections")
|
set(CMAKE_EXE_LINKER_FLAGS "-L${DEVKITPRO}/libctru/lib -L${DEVKITPRO}/picaGL/lib -L${DEVKITPRO}/portlibs/3ds/lib -specs=3dsx.specs -Wl,--gc-sections")
|
||||||
|
|
||||||
include_directories(${DEVKITPRO}/libctru/include ${DEVKITPRO}/picaGL/include ${DEVKITPRO}/portlibs/3ds/include ${CMAKE_SOURCE_DIR}/include)
|
include_directories(${DEVKITPRO}/libctru/include ${DEVKITPRO}/picaGL/include ${DEVKITPRO}/portlibs/3ds/include)
|
||||||
add_definitions("-D__3DS__")
|
add_definitions("-D__3DS__")
|
||||||
|
|
||||||
enable_language(ASM)
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} STATIC source/picasso_assembler.cpp source/picasso_library.cpp)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE Release CACHE STRING
|
||||||
|
"Choose the type of build, options are: None Debug Release."
|
||||||
|
FORCE)
|
||||||
|
endif(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/include)
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE STRING
|
||||||
|
"The install location"
|
||||||
|
FORCE)
|
||||||
|
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
|
||||||
|
include_directories(include)
|
||||||
|
|
||||||
|
set(HEADER_FILES
|
||||||
|
include/pica.hpp
|
||||||
|
include/picasso/picasso.h
|
||||||
|
include/picasso/types.h
|
||||||
|
include/picasso/FileClass.h
|
||||||
|
include/picasso/maestro_opcodes.h)
|
||||||
|
|
||||||
|
set(SOURCE_FILES
|
||||||
|
source/picasso_assembler.cpp
|
||||||
|
source/picasso_library.cpp)
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME}
|
||||||
|
${HEADER_FILES}
|
||||||
|
${SOURCE_FILES})
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
||||||
|
|
||||||
|
target_compile_features(${PROJECT_NAME}
|
||||||
|
# Features required to compile the library itself.
|
||||||
|
PRIVATE cxx_std_20 cxx_auto_type)
|
||||||
|
|
||||||
|
set(PROJECT_PREFIX ${PROJECT_NAME}-${picasso_VERSION})
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
# Used when building the library:
|
||||||
|
$<BUILD_INTERFACE:${foo_SOURCE_DIR}/include>
|
||||||
|
# Used when installing the library:
|
||||||
|
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
|
||||||
|
PRIVATE
|
||||||
|
# Used only when building the library:
|
||||||
|
src)
|
||||||
|
14
cmake/picasso-config.cmake.in
Normal file
14
cmake/picasso-config.cmake.in
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
# Include the exported CMake file
|
||||||
|
get_filename_component(picasso_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||||
|
|
||||||
|
# This macro enables usage of find_dependency().
|
||||||
|
# https://cmake.org/cmake/help/v3.11/module/CMakeFindDependencyMacro.html
|
||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
|
||||||
|
if(NOT TARGET picasso::picasso)
|
||||||
|
include("${picasso_CMAKE_DIR}/picasso-targets.cmake")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
check_required_components(picasso)
|
@ -7,7 +7,6 @@ set(CMAKE_EXE_LINKER_FLAGS "-L${DEVKITPRO}/libctru/lib -L${DEVKITPRO}/picaGL/lib
|
|||||||
include_directories(${DEVKITPRO}/libctru/include ${DEVKITPRO}/picaGL/include ${DEVKITPRO}/portlibs/3ds/include)
|
include_directories(${DEVKITPRO}/libctru/include ${DEVKITPRO}/picaGL/include ${DEVKITPRO}/portlibs/3ds/include)
|
||||||
add_definitions("-D__3DS__")
|
add_definitions("-D__3DS__")
|
||||||
|
|
||||||
|
|
||||||
set(APP_TITLE "${PROJECT_NAME}")
|
set(APP_TITLE "${PROJECT_NAME}")
|
||||||
set(APP_DESCRIPTION "Example of Lib Picasso")
|
set(APP_DESCRIPTION "Example of Lib Picasso")
|
||||||
set(APP_AUTHOR "Tobi-D7, tobid7vx")
|
set(APP_AUTHOR "Tobi-D7, tobid7vx")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <picasso.hpp>
|
#include <pica.hpp>
|
||||||
#include <picasso/picasso.h>
|
#include <picasso/picasso.h>
|
||||||
// f24 has:
|
// f24 has:
|
||||||
// - 1 sign bit
|
// - 1 sign bit
|
||||||
|
Loading…
Reference in New Issue
Block a user