mirror of https://github.com/libAthena/athena.git
Switch build fixes
This commit is contained in:
parent
80c283736e
commit
d4278bd52b
|
@ -243,12 +243,15 @@ install(EXPORT AthenaTargets DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT athena)
|
|||
# atdna import #
|
||||
################
|
||||
|
||||
if(NOT GEKKO AND NOT NX)
|
||||
add_subdirectory(atdna)
|
||||
# Test target
|
||||
atdna(atdna_test.cpp atdna/test.hpp)
|
||||
add_executable(atdna-test atdna/test.cpp atdna_test.cpp atdna/test.hpp)
|
||||
target_link_libraries(atdna-test athena-core athena-libyaml)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Switch")
|
||||
set_target_properties(atdna-test PROPERTIES SUFFIX ".elf")
|
||||
target_link_libraries(atdna-test athena-core athena-libyaml nx)
|
||||
else()
|
||||
target_link_libraries(atdna-test athena-core athena-libyaml)
|
||||
endif()
|
||||
|
||||
#########
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
if(NOT WIN32 AND NOT APPLE)
|
||||
if(NOT WIN32 AND NOT APPLE AND NOT NX)
|
||||
find_library(LZO_LIB lzo2)
|
||||
endif()
|
||||
if(WIN32 OR APPLE OR LZO_LIB STREQUAL LZO_LIB-NOTFOUND)
|
||||
if(WIN32 OR APPLE OR NX OR LZO_LIB STREQUAL LZO_LIB-NOTFOUND)
|
||||
include_directories(include)
|
||||
message(STATUS "Using Athena's built-in lzo")
|
||||
add_library(lzo2
|
||||
|
@ -77,7 +77,7 @@ add_library(lzo2
|
|||
include/lzo/lzoconf.h
|
||||
include/lzo/lzodefs.h
|
||||
include/lzo/lzoutil.h)
|
||||
if(WIN32 AND NOT UNIX)
|
||||
if(WIN32 AND NOT UNIX AND NOT NX)
|
||||
install(DIRECTORY include/lzo DESTINATION include COMPONENT lzo2)
|
||||
install(TARGETS lzo2 DESTINATION lib COMPONENT lzo2)
|
||||
endif()
|
||||
|
|
|
@ -31,13 +31,13 @@ endif()
|
|||
|
||||
set(PKG_CONFIG "${DEVKITPRO}/portlibs/bin/aarch64-none-elf-pkg-config" CACHE STRING "")
|
||||
set(CPPFLAGS "-D__SWITCH__ -I${DEVKITPRO}/libnx/include -I${DEVKITPRO}/portlibs/switch/include")
|
||||
set(CMAKE_C_FLAGS "${CPPFLAGS} -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIC -ffunction-sections" CACHE STRING "C flags")
|
||||
set(CMAKE_CXX_FLAGS "${CPPFLAGS} ${CMAKE_C_FLAGS} -fno-rtti -fno-exceptions -std=gnu++11" CACHE STRING "C++ flags")
|
||||
set(CMAKE_C_FLAGS "${CPPFLAGS} -march=armv8-a -neon -mtune=cortex-a57 -mfpu=neon -mtp=soft -fPIC -ffunction-sections" CACHE STRING "C flags")
|
||||
set(CMAKE_CXX_FLAGS "${CPPFLAGS} ${CMAKE_C_FLAGS} -fno-exceptions -std=gnu++11" CACHE STRING "C++ flags")
|
||||
|
||||
if(WITH_PORTLIBS)
|
||||
set(CMAKE_FIND_ROOT_PATH ${DEVKITPRO}/devkitA64 ${DEVKITPRO} ${DEVKITPRO}/libnx ${DEVKITPRO}/portlibs/switch)
|
||||
set(CMAKE_FIND_ROOT_PATH / ${DEVKITPRO}/devkitA64 ${DEVKITPRO} ${DEVKITPRO}/libnx ${DEVKITPRO}/portlibs/switch)
|
||||
else()
|
||||
set(CMAKE_FIND_ROOT_PATH ${DEVKITPRO}/devkitA64 ${DEVKITPRO}/libnx ${DEVKITPRO})
|
||||
set(CMAKE_FIND_ROOT_PATH / ${DEVKITPRO}/devkitA64 ${DEVKITPRO}/libnx ${DEVKITPRO})
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
|
Loading…
Reference in New Issue