aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/cmake/interpreter.py2
-rw-r--r--test cases/cmake/3 advanced no dep/subprojects/cmMod/CMakeLists.txt4
-rw-r--r--test cases/cmake/3 advanced no dep/test.json4
3 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py
index efdb840..dcb9e25 100644
--- a/mesonbuild/cmake/interpreter.py
+++ b/mesonbuild/cmake/interpreter.py
@@ -1124,7 +1124,7 @@ class CMakeInterpreter:
# Generate target kwargs
tgt_kwargs = {
- 'build_by_default': False,
+ 'build_by_default': tgt.install,
'link_args': tgt.link_flags + tgt.link_libraries,
'link_with': link_with,
'include_directories': id_node(inc_var),
diff --git a/test cases/cmake/3 advanced no dep/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/3 advanced no dep/subprojects/cmMod/CMakeLists.txt
index 38c1fff..4c782cb 100644
--- a/test cases/cmake/3 advanced no dep/subprojects/cmMod/CMakeLists.txt
+++ b/test cases/cmake/3 advanced no dep/subprojects/cmMod/CMakeLists.txt
@@ -16,9 +16,11 @@ generate_export_header(cmModLib)
set_target_properties(cmModLib PROPERTIES VERSION 1.0.1)
add_executable(testEXE main.cpp)
+add_executable(testEXE2 main.cpp)
target_link_libraries(testEXE cmModLib)
+target_link_libraries(testEXE2 cmModLib)
target_compile_definitions(cmModLibStatic PUBLIC CMMODLIB_STATIC_DEFINE)
-install(TARGETS cmModLib testEXE LIBRARY DESTINATION lib RUNTIME DESTINATION bin)
+install(TARGETS cmModLib testEXE testEXE2 LIBRARY DESTINATION lib RUNTIME DESTINATION bin)
diff --git a/test cases/cmake/3 advanced no dep/test.json b/test cases/cmake/3 advanced no dep/test.json
index 3b8b12d..24c89c4 100644
--- a/test cases/cmake/3 advanced no dep/test.json
+++ b/test cases/cmake/3 advanced no dep/test.json
@@ -5,6 +5,8 @@
{"type": "implib", "platform": "!cygwin", "file": "usr/bin/libcm_cmModLib"},
{"type": "pdb", "file": "usr/bin/cm_cmModLib"},
{"type": "pdb", "file": "usr/bin/cm_testEXE"},
- {"type": "exe", "file": "usr/bin/cm_testEXE"}
+ {"type": "exe", "file": "usr/bin/cm_testEXE"},
+ {"type": "pdb", "file": "usr/bin/cm_testEXE2"},
+ {"type": "exe", "file": "usr/bin/cm_testEXE2"}
]
}