metaforce/Editor/badging/CMakeLists.txt

39 lines
1.4 KiB
CMake
Raw Normal View History

2017-12-07 04:13:12 +00:00
if(NOT CMAKE_CROSSCOMPILING)
2016-07-16 19:21:12 +00:00
include_directories(${LIBPNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
add_executable(packbadge packbadge.c)
target_link_libraries(packbadge ${PNG_LIB} ${ZLIB_LIBRARIES})
2017-12-07 04:13:12 +00:00
##################
# Package Export #
##################
# Add all targets to the build-tree export set
export(TARGETS packbadge FILE "${CMAKE_CURRENT_BINARY_DIR}/urde-packbadgeTargets.cmake")
# Export the package for use from the build-tree
# (this registers the build-tree with a global CMake-registry)
export(PACKAGE urde-packbadge)
# Create the atdnaConfig.cmake
# ... for the build tree
configure_file(urde-packbadgeConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/urde-packbadgeConfig.cmake" @ONLY)
# ... for the install tree
configure_file(urde-packbadgeConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/urde-packbadgeConfig.cmake" @ONLY)
# ... for both
configure_file(urde-packbadgeConfigVersion.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/urde-packbadgeConfigVersion.cmake" @ONLY)
else()
find_package(urde-packbadge REQUIRED)
endif()
2016-07-16 19:21:12 +00:00
add_custom_command(OUTPUT badge.bin COMMAND $<TARGET_FILE:packbadge>
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/badge.png
${CMAKE_CURRENT_BINARY_DIR}/badge.bin
MAIN_DEPENDENCY badge.png COMMENT "Generating badge.bin")
2017-12-29 08:08:12 +00:00
bintoc(badge.cpp ${CMAKE_CURRENT_BINARY_DIR}/badge.bin URDE_BADGE)
2016-07-16 19:21:12 +00:00
add_library(UrdeBadging
2017-12-29 08:08:12 +00:00
badge.cpp badge.bin
2016-07-16 19:21:12 +00:00
Badging.hpp Badging.cpp)