UWP fixes

This commit is contained in:
Jack Andersen 2017-12-06 18:09:27 -10:00
parent 559096feeb
commit 79f0336588
8 changed files with 83 additions and 3 deletions

View File

@ -24,7 +24,22 @@ set(SQUISH_INCLUDE_DIR ${SQUISH_INCLUDE_DIR} PARENT_SCOPE)
set(BOO_INCLUDE_DIR extern/boo/include) set(BOO_INCLUDE_DIR extern/boo/include)
add_subdirectory(bintoc) add_subdirectory(bintoc)
if(NOT TARGET bintoc)
# Use native if cross compiling
find_package(hecl-bintoc REQUIRED)
endif()
add_subdirectory(extern) 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}) add_definitions(${BOO_SYS_DEFINES})
include_directories(include blender ${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR} include_directories(include blender ${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR}
${BOO_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${BOO_SYS_INCLUDES}) ${BOO_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${BOO_SYS_INCLUDES})

View File

@ -1,3 +1,4 @@
if(NOT CMAKE_CROSSCOMPILING)
add_executable(bintoc bintoc.c) add_executable(bintoc bintoc.c)
macro(bintoc out in sym) macro(bintoc out in sym)
if(IS_ABSOLUTE ${out}) if(IS_ABSOLUTE ${out})
@ -14,3 +15,27 @@ macro(bintoc out in sym)
COMMAND $<TARGET_FILE:bintoc> ARGS ${theIn} ${theOut} ${sym} COMMAND $<TARGET_FILE:bintoc> ARGS ${theIn} ${theOut} ${sym}
DEPENDS ${theIn}) DEPENDS ${theIn})
endmacro() 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()

View 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()

View 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

@ -1 +1 @@
Subproject commit da9699a7e29d2f7627e450f3d182e63a5140151d Subproject commit 2c66d5607623107a80f85608cca761e0327b5d8b

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit f228f236613792a7f7471610bf9e102d885dbae6 Subproject commit 62c2b1ffac1f1c580a8b423861e531a393cfe6c7

View File

@ -458,7 +458,7 @@
/* Memory model/platform independent fns */ /* Memory model/platform independent fns */
#ifndef PNG_ABORT #ifndef PNG_ABORT
# ifdef _WINDOWS_ # ifdef _WINDOWS_
# define PNG_ABORT() ExitProcess(0) # define PNG_ABORT() abort()
# else # else
# define PNG_ABORT() abort() # define PNG_ABORT() abort()
# endif # endif

View File

@ -65,3 +65,6 @@ add_library(hecl-common
atdna_CVar.cpp atdna_CVar.cpp
${PLAT_SRCS}) ${PLAT_SRCS})
if(WINDOWS_STORE)
set_property(TARGET hecl-common PROPERTY VS_WINRT_COMPONENT TRUE)
endif()