0.7.0 rewrite dev
- remove everyting - keep core -rename bit_utils to bits - add formatter for color - add float getters to color - start with new drivers api
This commit is contained in:
@@ -11,51 +11,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||
# Enable Compile Command Export
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
option(PD_INCLUDE_DIR "")
|
||||
|
||||
### Helper Function to Build Librarys without have always
|
||||
### These includes and definition defines
|
||||
function(pd_add_lib TARGET_NAME)
|
||||
set(opts "BUILD_SHARED")
|
||||
set(one_val_args "")
|
||||
set(multi_val_args SRC_FILES DEPENDS)
|
||||
cmake_parse_arguments(ARG "${opts}" "${one_val_args}" "${multi_val_args}" ${ARGN})
|
||||
|
||||
string(REPLACE "-" "_" FLAG_NAME_T ${TARGET_NAME})
|
||||
string(TOUPPER ${FLAG_NAME_T} FLAG_NAME_F)
|
||||
|
||||
if(ARG_BUILD_SHARED)
|
||||
add_library(${TARGET_NAME} SHARED ${ARG_SRC_FILES})
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC -D${FLAG_NAME_F}_BUILD_SHARED=1)
|
||||
message("Building SHARED library: ${FLAG_NAME_F}_BUILD_SHARED=1")
|
||||
else()
|
||||
add_library(${TARGET_NAME} STATIC ${ARG_SRC_FILES})
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC -D${FLAG_NAME_F}_BUILD_SHARED=0)
|
||||
message("Building STATIC library: ${FLAG_NAME_F}_BUILD_SHARED=0")
|
||||
endif()
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
${PD_INCLUDE_DIR}
|
||||
${DEVKITPRO}/portlibs/3ds/include
|
||||
)
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE
|
||||
-D_GNU_SOURCE=1
|
||||
-DPALLADIUM_VERSION="${PROJECT_VERSION}"
|
||||
-DPALLADIUM_GIT_COMMIT="${GIT_SHORT_HASH}"
|
||||
-DPALLADIUM_GIT_BRANCH="${GIT_BRANCH}"
|
||||
-DBUILD_CTR=1
|
||||
)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS")
|
||||
target_compile_options(${TARGET_NAME} PRIVATE
|
||||
-Wno-abi
|
||||
)
|
||||
endif()
|
||||
### For the libs that depend on another
|
||||
if(ARG_DEPENDS)
|
||||
target_link_libraries(${TARGET_NAME} PUBLIC ${ARG_DEPENDS})
|
||||
endif()
|
||||
install(TARGETS ${TARGET_NAME})
|
||||
endfunction()
|
||||
|
||||
### GIT HELPER ###
|
||||
|
||||
function(pd_git_get_hash ret)
|
||||
|
||||
Reference in New Issue
Block a user