Debian Codegraph @

tools/filamesh/CMakeLists.txt

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 cmake_minimum_required(VERSION 3.19)
2 project(filamesh)
3
4 set(TARGET filamesh)
5
6 # ==================================================================================================
7 # Sources
8 # ==================================================================================================
9 set(SRCS
10 src/MeshWriter.cpp
11 src/MeshWriter.h
12 src/main.cpp)
13
14 # ==================================================================================================
15 # Target definitions
16 # ==================================================================================================
17 add_executable(${TARGET} ${SRCS})
18
19 target_link_libraries(${TARGET} PUBLIC math)
20 target_link_libraries(${TARGET} PUBLIC utils)
21 target_link_libraries(${TARGET} PUBLIC assimp)
22 target_link_libraries(${TARGET} PRIVATE getopt filameshio meshoptimizer)
23
24 # ==================================================================================================
25 # Compile options and optimizations
26 # ==================================================================================================
27 if(NOT MSVC)
28 target_compile_options(${TARGET} PRIVATE -Wno-deprecated-register)
29
30 if (NOT LINUX)
31 target_compile_options(${TARGET} PRIVATE
32 -Wno-address-of-packed-member
33 )
34 endif()
35 endif()
36
37 # =================================================================================================
38 # Licenses
39 # ==================================================================================================
40 set(MODULE_LICENSES getopt libassimp meshoptimizer)
41 set(GENERATION_ROOT ${CMAKE_CURRENT_BINARY_DIR}/generated)
42 list_licenses(${GENERATION_ROOT}/licenses/licenses.inc ${MODULE_LICENSES})
43 target_include_directories(${TARGET} PRIVATE ${GENERATION_ROOT})
44
45 # ==================================================================================================
46 # Installation
47 # ==================================================================================================
48 install(TARGETS ${TARGET} RUNTIME DESTINATION bin)
49 install(FILES "README.md" DESTINATION docs/ RENAME "${TARGET}.md")