Skip to content

Commit

Permalink
fix compilation on notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
leanid committed Jan 14, 2025
1 parent 873f00c commit 9334633
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
29 changes: 14 additions & 15 deletions 00-basic-prog/29-localization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ cmake_minimum_required(VERSION 3.30)
project(29-localization CXX)

find_package(
Boost
1.86.0 # should match version in root CMakeLists.txt
Boost 1.86.0 # should match version in root CMakeLists.txt
EXACT # Minimum or EXACT version e.g. 1.67.0
# REQUIRED # Fail with error if Boost is not found
COMPONENTS locale # Boost libraries by their canonical name
COMPONENTS locale algorithm # Boost libraries by their canonical name
# REQUIRED
# e.g. "date_time" for "libboost_date_time"
#[OPTIONAL_COMPONENTS <libs>...]
Expand All @@ -33,19 +32,19 @@ endif()
message(STATUS "xgettext found: ${XGETTEXT_EXECUTABLE}")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/messages.pot
COMMAND xgettext -o ${CMAKE_CURRENT_SOURCE_DIR}/messages.pot
--add-comments="TRANSLATORS:"
--keyword=translate
--keyword=translate:1,2
--keyword=translate:1,2,3 # --flag=translate:1:pass-c-format
--directory=${CMAKE_CURRENT_SOURCE_DIR}
# --join-existing
${CMAKE_CURRENT_SOURCE_DIR}/main.cxx
COMMAND
xgettext -o ${CMAKE_CURRENT_SOURCE_DIR}/messages.pot
--add-comments="TRANSLATORS:" --keyword=translate
--keyword=translate:1,2
--keyword=translate:1,2,3 # --flag=translate:1:pass-c-format
--directory=${CMAKE_CURRENT_SOURCE_DIR}
# --join-existing
${CMAKE_CURRENT_SOURCE_DIR}/main.cxx
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/main.cxx
VERBATIM
COMMENT "generating localization template [messages.pot] from source main.cxx"
)
add_custom_target(generate_messages ALL DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/messages.pot)
COMMENT
"generating localization template [messages.pot] from source main.cxx")
add_custom_target(generate_messages ALL
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/messages.pot)

add_dependencies(29-localization generate_messages)
8 changes: 6 additions & 2 deletions 00-basic-prog/30-crypto-aes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ project(aes128 CXX)

find_package(OpenSSL #REQUIRED
)
if(NOT OpenSSL_FOUND)
message(STATUS "OpenSSL not found, skip this example")
return()
endif()

find_package(
Boost
1.86.0 # same version with same compiler settings
Boost 1.86.0 # same version with same compiler settings
EXACT # Minimum or EXACT version e.g. 1.67.0
# REQUIRED # Fail with error if Boost is not found
COMPONENTS program_options # Boost libraries by their canonical name
Expand Down

0 comments on commit 9334633

Please sign in to comment.