Skip to content

Commit 82ccdd3

Browse files
committed
cmake: Fix install locations to honor settings inherited from parent project.
1 parent 0ebe309 commit 82ccdd3

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

cppconn/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,8 @@ SET(MYSQLCPPCONN_INSTALL_HEADERS
8181
${CMAKE_CURRENT_BINARY_DIR}/version_info.h
8282
variant.h)
8383

84-
INSTALL(FILES ${MYSQLCPPCONN_INSTALL_HEADERS} DESTINATION include/jdbc/cppconn COMPONENT JDBCDev)
84+
INSTALL(
85+
FILES ${MYSQLCPPCONN_INSTALL_HEADERS}
86+
DESTINATION ${INSTALL_INCLUDE_DIR}/cppconn
87+
COMPONENT JDBCDev
88+
)

install_layout.cmake

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,34 +52,24 @@
5252
# Note: We expect VS variable to hold the "vsNN" bit on Windows.
5353
#
5454

55-
if(NOT DEFINED IS64BIT)
56-
message(FATAL_ERROR "IS64BIT not defined!")
55+
if(jdbc_stand_alone)
56+
# TODO: Manage install locations for stand-alone build.
57+
return()
5758
endif()
5859

59-
if(NOT DEFINED INSTALL_LIB_DIR)
6060

61-
if(IS64BIT)
62-
set(INSTALL_LIB_DIR "lib64")
63-
else()
64-
set(INSTALL_LIB_DIR "lib")
65-
endif()
66-
67-
endif()
68-
69-
if(NOT DEFINED INSTALL_LIB_DIR_STATIC)
61+
if(NOT INSTALL_INCLUDE_DIR OR NOT INSTALL_LIB_DIR OR NOT INSTALL_DOC_DIR)
7062

71-
set(INSTALL_LIB_DIR_STATIC "${INSTALL_LIB_DIR}")
72-
if(VS)
73-
set(INSTALL_LIB_DIR_STATIC "${INSTALL_LIB_DIR_STATIC}/${VS}")
74-
endif()
63+
message(FATAL_ERROR
64+
"Install locations not set when configuring legacy connector."
65+
" This should not happen!"
66+
)
7567

7668
endif()
7769

78-
if(NOT DEFINED INSTALL_DOC_DIR)
79-
set(INSTALL_DOC_DIR doc)
80-
endif()
8170

82-
set(INSTALL_INCLUDE_DIR include/jdbc)
71+
set(INSTALL_INCLUDE_DIR "${INSTALL_INCLUDE_DIR}/jdbc")
72+
8373

8474
#
8575
# Library names

0 commit comments

Comments
 (0)