mirror of
https://github.com/google/sentencepiece.git
synced 2024-09-11 10:55:42 +03:00
Merge pull request #979 from h-vetinari/libdir
move setting of default CMAKE_INSTALL_{BIN,INCLUDE,LIB}DIR before first use
This commit is contained in:
commit
1d91514435
@ -57,6 +57,18 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
|
||||
string(APPEND CMAKE_CXX_FLAGS " -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=''")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR bin)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(CMAKE_INSTALL_LIBDIR lib)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_INCLUDEDIR include)
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
include(GNUInstallDirs)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
@ -103,18 +115,6 @@ if (APPLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR bin)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(CMAKE_INSTALL_LIBDIR lib)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_INCDIR)
|
||||
set(CMAKE_INSTALL_INCDIR include)
|
||||
endif()
|
||||
|
||||
# SPDX-License-Identifier: (MIT OR CC0-1.0)
|
||||
# Copyright 2020 Jan Tojnar
|
||||
# https://github.com/jtojnar/cmake-snips
|
||||
|
@ -317,9 +317,9 @@ install(TARGETS ${SPM_INSTALLTARGETS}
|
||||
endif()
|
||||
|
||||
install(FILES sentencepiece_trainer.h sentencepiece_processor.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCDIR})
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
if (NOT SPM_PROTOBUF_PROVIDER STREQUAL "internal")
|
||||
install(FILES ${SPM_PROTO_HDRS} DESTINATION ${CMAKE_INSTALL_INCDIR})
|
||||
install(FILES ${SPM_PROTO_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
endif()
|
||||
|
||||
file(TO_NATIVE_PATH "${PROJECT_SOURCE_DIR}/data" data_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user