mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2024-11-25 00:53:43 +00:00
Add install target.
This commit is contained in:
parent
7176472526
commit
c89d4b69d5
13 changed files with 70 additions and 3 deletions
|
@ -12,7 +12,8 @@ option(DINDEXER_WITH_MEDIA_AUTODETECT "Enable code that tries to autodetect the
|
|||
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION_MAJOR EQUAL "5")
|
||||
option(DINDEXER_CXX11_ABI "Controls if _GLIBCXX_USE_CXX11_ABI gets set to 0 or not" ON)
|
||||
endif()
|
||||
set(ACTIONS_PATH "${CMAKE_CURRENT_BINARY_DIR}/src" CACHE STRING "Actions search path")
|
||||
set(DINDEXER_ACTIONS_PATH "${CMAKE_CURRENT_BINARY_DIR}/src" CACHE STRING "Actions search path")
|
||||
string(REGEX MATCH "[^/].*" ACTIONS_PATH_INSTALL "${DINDEXER_ACTIONS_PATH}")
|
||||
set(DB_OWNER_NAME "$ENV{USER}" CACHE STRING "Name that will be used as the DB owner name")
|
||||
set(PROJECT_VERSION_BETA "1")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wall -Wextra -Wno-missing-field-initializers")
|
||||
|
@ -37,7 +38,7 @@ import_libpqtypes_project("${PostgreSQL_INCLUDE_DIRS}")
|
|||
add_library(${PROJECT_NAME} INTERFACE)
|
||||
add_library(${bare_name}-inc INTERFACE)
|
||||
|
||||
message(STATUS "Actions search path set to: \"${ACTIONS_PATH}\"")
|
||||
message(STATUS "Actions search path set to: \"${DINDEXER_ACTIONS_PATH}\"")
|
||||
|
||||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/src/${bare_name}Config.h.in"
|
||||
|
|
|
@ -18,3 +18,9 @@ string(REPLACE "${bare_name}-" "" ACTION_NAME "${PROJECT_NAME}")
|
|||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE ACTION_NAME="${ACTION_NAME}"
|
||||
)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION ${ACTIONS_PATH_INSTALL}
|
||||
ARCHIVE DESTINATION lib/static
|
||||
)
|
||||
|
|
|
@ -22,6 +22,12 @@ function (import_libpqtypes_project PostgreSQL_INCLUDE_DIRS)
|
|||
set_target_properties(pqtypes PROPERTIES
|
||||
IMPORTED_LOCATION ${libpqtypes_prefix}/lib/libpqtypes.so
|
||||
)
|
||||
install(
|
||||
DIRECTORY ${libpqtypes_prefix}/lib/
|
||||
DESTINATION "lib"
|
||||
COMPONENT runtime
|
||||
FILES_MATCHING PATTERN "libpqtypes.so*"
|
||||
)
|
||||
|
||||
if(EXISTS "${libpqtypes_base_path}/configure.ac")
|
||||
file(STRINGS "${libpqtypes_base_path}/configure.ac" libpqtypes_version_str REGEX "^AC_INIT[\t ]*\\([\t ]*libpqtypes[\t ]*,[\t ]*[0-9].*$")
|
||||
|
|
|
@ -19,3 +19,9 @@ target_link_libraries(${PROJECT_NAME}
|
|||
PRIVATE ${bare_name}-if
|
||||
PRIVATE ${YAMLCPP_LIBRARY}
|
||||
)
|
||||
|
||||
#install(TARGETS ${PROJECT_NAME}
|
||||
# LIBRARY DESTINATION lib
|
||||
# RUNTIME DESTINATION bin
|
||||
# ARCHIVE DESTINATION lib/static
|
||||
#)
|
||||
|
|
|
@ -19,3 +19,9 @@ string(REPLACE "${bare_name}-" "" ACTION_NAME "${PROJECT_NAME}")
|
|||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE ACTION_NAME="${ACTION_NAME}"
|
||||
)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION ${ACTIONS_PATH_INSTALL}
|
||||
ARCHIVE DESTINATION lib/static
|
||||
)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#define VERSION_PATCH @PROJECT_VERSION_PATCH@
|
||||
#define VERSION_GIT "@PROJECT_VERSION_GIT@"
|
||||
#define CONFIG_FILE_PATH "@DINDEXER_CONFIG_FILE@"
|
||||
#define ACTIONS_SEARCH_PATH "@ACTIONS_PATH@"
|
||||
#define ACTIONS_SEARCH_PATH "@DINDEXER_ACTIONS_PATH@"
|
||||
#define ACTION_PREFIX "@bare_name@-"
|
||||
#define DB_OWNER_NAME "@DB_OWNER_NAME@"
|
||||
|
||||
|
|
|
@ -19,3 +19,9 @@ string(REPLACE "${bare_name}-" "" ACTION_NAME "${PROJECT_NAME}")
|
|||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE ACTION_NAME="${ACTION_NAME}"
|
||||
)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION ${ACTIONS_PATH_INSTALL}
|
||||
ARCHIVE DESTINATION lib/static
|
||||
)
|
||||
|
|
|
@ -38,3 +38,9 @@ if (DINDEXER_WITH_MEDIA_AUTODETECT)
|
|||
PRIVATE WITH_MEDIA_AUTODETECT
|
||||
)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib/static
|
||||
)
|
||||
|
|
|
@ -21,3 +21,9 @@ if (DINDEXER_WITH_MEDIA_AUTODETECT)
|
|||
PRIVATE WITH_MEDIA_AUTODETECT
|
||||
)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib/static
|
||||
)
|
||||
|
|
|
@ -21,3 +21,9 @@ string(REPLACE "${bare_name}-" "" ACTION_NAME "${PROJECT_NAME}")
|
|||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE ACTION_NAME="${ACTION_NAME}"
|
||||
)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION ${ACTIONS_PATH_INSTALL}
|
||||
ARCHIVE DESTINATION lib/static
|
||||
)
|
||||
|
|
|
@ -14,3 +14,9 @@ target_link_libraries(${PROJECT_NAME}
|
|||
PRIVATE ${bare_name}-if
|
||||
PRIVATE pqtypes
|
||||
)
|
||||
|
||||
#install(TARGETS ${PROJECT_NAME}
|
||||
# LIBRARY DESTINATION lib
|
||||
# RUNTIME DESTINATION bin
|
||||
# ARCHIVE DESTINATION lib/static
|
||||
#)
|
||||
|
|
|
@ -18,3 +18,9 @@ string(REPLACE "${bare_name}-" "" ACTION_NAME "${PROJECT_NAME}")
|
|||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE ACTION_NAME="${ACTION_NAME}"
|
||||
)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION ${ACTIONS_PATH_INSTALL}
|
||||
ARCHIVE DESTINATION lib/static
|
||||
)
|
||||
|
|
|
@ -29,3 +29,9 @@ if (DINDEXER_WITH_MEDIA_AUTODETECT)
|
|||
PRIVATE WITH_MEDIA_AUTODETECT
|
||||
)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION ${ACTIONS_PATH_INSTALL}
|
||||
ARCHIVE DESTINATION lib/static
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue