Skip to content

Commit

Permalink
warning removal
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Mar 28, 2024
1 parent e08323c commit 999288f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ endif()

install(DIRECTORY examples DESTINATION share/doc/mrc/)

add_subdirectory(examples/simple)
# add_subdirectory(examples/simple)
10 changes: 7 additions & 3 deletions examples/simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ list(PREPEND CMAKE_PREFIX_PATH ../../cmake)
project(mrc-user VERSION 1.0.0 LANGUAGES CXX)

# Locate the mrc executable and load the mrc_* functions
find_package(Mrc)
# This of course only works when you have installed mrc already
find_package(mrc)

# resources depend on C++17 features, like std::filesystem
set(CXX_EXTENSIONS OFF)
Expand All @@ -24,10 +25,13 @@ add_executable(mrc-user ${CMAKE_CURRENT_SOURCE_DIR}/mrc-user.cpp)
# # can be specified here
# mrc_target_resources(mrc-user CREATE_ELF_TEMPLATE VERBOSE
# RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/hello.txt)

#
# But you can also create a static library containing the resources
# and then link to that static library:

add_library(rsrc STATIC)
set_target_properties(rsrc PROPERTIES LINKER_LANGUAGE "CXX")
mrc_target_resources(rsrc CREATE_ELF_TEMPLATE VERBOSE
RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/hello.txt)
target_link_libraries(mrc-user PRIVATE rsrc)
target_link_libraries(mrc-user PRIVATE rsrc)

0 comments on commit 999288f

Please sign in to comment.