File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,18 +65,25 @@ set(CMAKE_CXX_STANDARD 17)
6565if (!TM_VERSION)
6666 execute_process (
6767 COMMAND git describe --tags --abbrev=0
68- OUTPUT_VARIABLE tm_version )
68+ OUTPUT_VARIABLE tm_version
69+ OUTPUT_STRIP_TRAILING_WHITESPACE )
6970 add_compile_definitions (TM_VERSION=${tm_version} )
7071endif ()
7172
7273if (MSVC )
7374 find_package (unofficial-sqlite3 CONFIG REQUIRED )
7475 add_library (SQLite::SQLite3 ALIAS unofficial::sqlite3::sqlite3 )
7576 add_definitions (-D_USE_MATH_DEFINES -DWIN32_LEAN_AND_MEAN -DNOGDI -D__restrict__=__restrict )
76- set (THREAD_LIB "" )
77+ set (THREAD_LIB "" )
7778else ()
7879 find_package (SQLite3 REQUIRED )
79- set (THREAD_LIB pthread)
80+ if (NOT TARGET SQLite::SQLite3)
81+ add_library (SQLite::SQLite3 IMPORTED UNKNOWN )
82+ set_target_properties (SQLite::SQLite3 PROPERTIES
83+ IMPORTED_LOCATION "${SQLite3_LIBRARIES} "
84+ INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIRS} " )
85+ endif ()
86+ set (THREAD_LIB pthread)
8087endif ()
8188
8289file (GLOB tilemaker_src_files
You can’t perform that action at this time.
0 commit comments