File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
65
65
66
66
PROJECT (MySQL_CONCPP )
67
67
68
- include (version .cmake )
69
-
70
68
# Load cmake modules
71
69
72
70
include (cdk/cmake/setup.cmake )
@@ -77,6 +75,26 @@ include(dependency) # find_dependency()
77
75
include (config_options ) # add_config_option()
78
76
include (libutils ) # merge_libraries()
79
77
78
+ #
79
+ # Detect if we are configured as stand-alone project, or sub-project.
80
+ #
81
+
82
+ if (PROJECT_NAME STREQUAL CMAKE_PROJECT_NAME )
83
+
84
+ SET (concpp_stand_alone 1 )
85
+
86
+ else ()
87
+
88
+ MESSAGE ("Building Connector/C++ as part of ${CMAKE_PROJECT_NAME} project" )
89
+ SET (concpp_stand_alone 0 )
90
+ set (WITH_TESTS OFF )
91
+ set (WITH_DOC OFF )
92
+ set (WITH_HEADER_CHECKS OFF )
93
+
94
+ endif ()
95
+
96
+ include (version .cmake )
97
+
80
98
message ("Building on system: ${CMAKE_SYSTEM} (${CMAKE_SYSTEM_PROCESSOR} )" )
81
99
message ("Using cmake generator: ${CMAKE_GENERATOR} " )
82
100
#message("Compiler identification: ${CMAKE_CXX_COMPILER_ID}")
@@ -425,6 +443,13 @@ add_custom_command(TARGET libconcpp POST_BUILD
425
443
)
426
444
endif ()
427
445
446
+ #
447
+ # Stop here if this is a sub-project of a bigger project.
448
+ #
449
+
450
+ if (NOT concpp_stand_alone )
451
+ return ()
452
+ endif ()
428
453
429
454
#
430
455
# Install specifications
You can’t perform that action at this time.
0 commit comments