mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
UWP fixes
This commit is contained in:
@@ -24,7 +24,22 @@ set(SQUISH_INCLUDE_DIR ${SQUISH_INCLUDE_DIR} PARENT_SCOPE)
|
||||
set(BOO_INCLUDE_DIR extern/boo/include)
|
||||
|
||||
add_subdirectory(bintoc)
|
||||
|
||||
if(NOT TARGET bintoc)
|
||||
# Use native if cross compiling
|
||||
find_package(hecl-bintoc REQUIRED)
|
||||
endif()
|
||||
|
||||
add_subdirectory(extern)
|
||||
|
||||
if(NOT TARGET atdna)
|
||||
# Import native atdna if cross-compiling
|
||||
find_package(atdna REQUIRED)
|
||||
if(NOT TARGET atdna)
|
||||
message(FATAL_ERROR "atdna required for building hecl; please verify LLVM installation")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions(${BOO_SYS_DEFINES})
|
||||
include_directories(include blender ${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR}
|
||||
${BOO_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${BOO_SYS_INCLUDES})
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
add_executable(bintoc bintoc.c)
|
||||
macro(bintoc out in sym)
|
||||
if(IS_ABSOLUTE ${out})
|
||||
@@ -14,3 +15,27 @@ macro(bintoc out in sym)
|
||||
COMMAND $<TARGET_FILE:bintoc> ARGS ${theIn} ${theOut} ${sym}
|
||||
DEPENDS ${theIn})
|
||||
endmacro()
|
||||
|
||||
##################
|
||||
# Package Export #
|
||||
##################
|
||||
|
||||
# Add all targets to the build-tree export set
|
||||
export(TARGETS bintoc FILE "${CMAKE_CURRENT_BINARY_DIR}/hecl-bintocTargets.cmake")
|
||||
|
||||
# Export the package for use from the build-tree
|
||||
# (this registers the build-tree with a global CMake-registry)
|
||||
export(PACKAGE hecl-bintoc)
|
||||
|
||||
# Create the atdnaConfig.cmake
|
||||
# ... for the build tree
|
||||
configure_file(hecl-bintocConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/hecl-bintocConfig.cmake" @ONLY)
|
||||
# ... for the install tree
|
||||
configure_file(hecl-bintocConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hecl-bintocConfig.cmake" @ONLY)
|
||||
# ... for both
|
||||
configure_file(hecl-bintocConfigVersion.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/hecl-bintocConfigVersion.cmake" @ONLY)
|
||||
|
||||
else()
|
||||
# Use native if cross compiling
|
||||
find_package(hecl-bintoc REQUIRED)
|
||||
endif()
|
||||
|
||||
25
hecl/bintoc/hecl-bintocConfig.cmake.in
Normal file
25
hecl/bintoc/hecl-bintocConfig.cmake.in
Normal file
@@ -0,0 +1,25 @@
|
||||
# - Config file for the bintoc package
|
||||
|
||||
# Compute paths
|
||||
get_filename_component(BINTOC_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
# Our library dependencies (contains definitions for IMPORTED targets)
|
||||
if(NOT TARGET bintoc AND NOT bintoc_BINARY_DIR)
|
||||
include("${BINTOC_CMAKE_DIR}/hecl-bintocTargets.cmake")
|
||||
endif()
|
||||
|
||||
macro(bintoc out in sym)
|
||||
if(IS_ABSOLUTE ${out})
|
||||
set(theOut ${out})
|
||||
else()
|
||||
set(theOut ${CMAKE_CURRENT_BINARY_DIR}/${out})
|
||||
endif()
|
||||
if(IS_ABSOLUTE ${in})
|
||||
set(theIn ${in})
|
||||
else()
|
||||
set(theIn ${CMAKE_CURRENT_SOURCE_DIR}/${in})
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${theOut}
|
||||
COMMAND $<TARGET_FILE:bintoc> ARGS ${theIn} ${theOut} ${sym}
|
||||
DEPENDS ${theIn})
|
||||
endmacro()
|
||||
12
hecl/bintoc/hecl-bintocConfigVersion.cmake.in
Normal file
12
hecl/bintoc/hecl-bintocConfigVersion.cmake.in
Normal file
@@ -0,0 +1,12 @@
|
||||
set(PACKAGE_VERSION "@BINTOC_VERSION@")
|
||||
|
||||
# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
||||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
2
hecl/extern/athena
vendored
2
hecl/extern/athena
vendored
Submodule hecl/extern/athena updated: da9699a7e2...2c66d56076
2
hecl/extern/boo
vendored
2
hecl/extern/boo
vendored
Submodule hecl/extern/boo updated: f228f23661...62c2b1ffac
2
hecl/extern/libpng/pngpriv.h
vendored
2
hecl/extern/libpng/pngpriv.h
vendored
@@ -458,7 +458,7 @@
|
||||
/* Memory model/platform independent fns */
|
||||
#ifndef PNG_ABORT
|
||||
# ifdef _WINDOWS_
|
||||
# define PNG_ABORT() ExitProcess(0)
|
||||
# define PNG_ABORT() abort()
|
||||
# else
|
||||
# define PNG_ABORT() abort()
|
||||
# endif
|
||||
|
||||
@@ -65,3 +65,6 @@ add_library(hecl-common
|
||||
atdna_CVar.cpp
|
||||
${PLAT_SRCS})
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
set_property(TARGET hecl-common PROPERTY VS_WINRT_COMPONENT TRUE)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user