Revision: 9149 https://osdn.net/projects/ttssh2/scm/svn/commits/9149 Author: zmatsuo Date: 2021-02-11 00:10:11 +0900 (Thu, 11 Feb 2021) Log Message: ----------- keycode.exe の Unicode 版もビルドするようにした - cmakeビルド時のみ Modified Paths: -------------- trunk/teraterm/CMakeLists.txt trunk/teraterm/keycode/CMakeLists.txt -------------- next part -------------- Modified: trunk/teraterm/CMakeLists.txt =================================================================== --- trunk/teraterm/CMakeLists.txt 2021-02-10 15:09:53 UTC (rev 9148) +++ trunk/teraterm/CMakeLists.txt 2021-02-10 15:10:11 UTC (rev 9149) @@ -28,6 +28,9 @@ set_target_properties( keycode PROPERTIES FOLDER teraterm) +set_target_properties( + keycodeW + PROPERTIES FOLDER teraterm) add_subdirectory(common) set_target_properties( Modified: trunk/teraterm/keycode/CMakeLists.txt =================================================================== --- trunk/teraterm/keycode/CMakeLists.txt 2021-02-10 15:09:53 UTC (rev 9148) +++ trunk/teraterm/keycode/CMakeLists.txt 2021-02-10 15:10:11 UTC (rev 9149) @@ -2,7 +2,6 @@ project(${PACKAGE_NAME}) - add_executable( ${PACKAGE_NAME} WIN32 keycode.c @@ -46,3 +45,52 @@ TARGETS ${PACKAGE_NAME} DESTINATION . ) + +### unicode version + +set(PACKAGE_NAME_2 "keycodeW") + +add_executable( + ${PACKAGE_NAME_2} WIN32 + keycode.c + keycode.ico + keycode-version.rc + keycode.rc + kc_res.h + ) + +if(SUPPORT_OLD_WINDOWS) + if(MSVC) + target_sources( + ${PACKAGE_NAME_2} + PRIVATE + ../../teraterm/common/compat_w95_vs2005.c + ) + endif() +endif(SUPPORT_OLD_WINDOWS) + +set_target_properties( + ${PACKAGE_NAME_2} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/" + ) + +target_compile_definitions( + ${PACKAGE_NAME_2} + PRIVATE + UNICODE _UNICODE + ) + +target_include_directories( + ${PACKAGE_NAME_2} + PRIVATE + ../common + ) + +if(MSVC) + target_compile_options( + ${PACKAGE_NAME_2} + PRIVATE + /W4 + ) +endif()