Browse Subversion Repository
Contents of /trunk/ttpmenu/CMakeLists.txt
Parent Directory
| Revision Log
Revision 10778 -
( show annotations)
( download)
Fri Jun 23 16:07:53 2023 UTC
(9 months, 2 weeks ago)
by zmatsuo
File MIME type: text/plain
File size: 1590 byte(s)
cmake 3.11 でビルドできるように修正
- VS2005でビルドするため
- 3.11 では target_link_options() が使用できない
| 1 |
set(PACKAGE_NAME "ttpmenu") |
| 2 |
|
| 3 |
project(${PACKAGE_NAME}) |
| 4 |
|
| 5 |
add_executable( |
| 6 |
${PACKAGE_NAME} WIN32 |
| 7 |
resource.h |
| 8 |
registry.cpp |
| 9 |
ttpmenu.h |
| 10 |
ttpmenu.cpp |
| 11 |
winmisc.cpp |
| 12 |
# |
| 13 |
left.ico |
| 14 |
right.ico |
| 15 |
teraterm.ico |
| 16 |
ttpmenu.rc |
| 17 |
) |
| 18 |
|
| 19 |
target_compile_definitions( |
| 20 |
${PACKAGE_NAME} |
| 21 |
PRIVATE |
| 22 |
# UNICODE=1 _UNICODE=1 |
| 23 |
) |
| 24 |
|
| 25 |
target_sources( |
| 26 |
${PACKAGE_NAME} |
| 27 |
PRIVATE |
| 28 |
../teraterm/common/ttlib.h |
| 29 |
../teraterm/common/ttlib.c |
| 30 |
../teraterm/common/i18n.h |
| 31 |
../teraterm/common/i18n.c |
| 32 |
../teraterm/common/codeconv.h |
| 33 |
../teraterm/common/compat_win.h |
| 34 |
../teraterm/common/dllutil.h |
| 35 |
) |
| 36 |
|
| 37 |
source_group( |
| 38 |
"common" |
| 39 |
REGULAR_EXPRESSION |
| 40 |
"teraterm\/common\/") |
| 41 |
|
| 42 |
if(SUPPORT_OLD_WINDOWS) |
| 43 |
target_link_libraries( |
| 44 |
${PACKAGE_NAME} |
| 45 |
PRIVATE |
| 46 |
layer_for_unicode |
| 47 |
) |
| 48 |
if(MSVC) |
| 49 |
target_sources( |
| 50 |
${PACKAGE_NAME} |
| 51 |
PRIVATE |
| 52 |
../../teraterm/common/compat_w95_vs2005.c |
| 53 |
) |
| 54 |
endif() |
| 55 |
endif(SUPPORT_OLD_WINDOWS) |
| 56 |
|
| 57 |
set_target_properties( |
| 58 |
${PACKAGE_NAME} |
| 59 |
PROPERTIES |
| 60 |
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/" |
| 61 |
) |
| 62 |
|
| 63 |
target_include_directories( |
| 64 |
${PACKAGE_NAME} |
| 65 |
PRIVATE |
| 66 |
. |
| 67 |
) |
| 68 |
|
| 69 |
if(MSVC) |
| 70 |
if(${CMAKE_VERSION} VERSION_LESS "3.12.0") |
| 71 |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") |
| 72 |
else() |
| 73 |
target_link_options( |
| 74 |
${PACKAGE_NAME} |
| 75 |
PRIVATE |
| 76 |
/MANIFEST:NO) |
| 77 |
endif() |
| 78 |
endif() |
| 79 |
|
| 80 |
target_link_libraries( |
| 81 |
${PACKAGE_NAME} |
| 82 |
PRIVATE |
| 83 |
common_static |
| 84 |
version |
| 85 |
comctl32 |
| 86 |
user32 |
| 87 |
gdi32 |
| 88 |
comdlg32 |
| 89 |
) |
| 90 |
|
| 91 |
install( |
| 92 |
TARGETS ${PACKAGE_NAME} |
| 93 |
DESTINATION . |
| 94 |
) |
|