mirror of
				https://github.com/fmang/opustags.git
				synced 2025-10-30 16:38:10 +01:00 
			
		
		
		
	Change path to auto generated version.h
This is to make it possible to zip just the src/ directory if one wishes not to use git.
This commit is contained in:
		| @@ -3,6 +3,7 @@ project (opustags) | ||||
| set(CMAKE_CXX_STANDARD 14) | ||||
| set(CMAKE_CXX_STANDARD_REQUIRED on) | ||||
| set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules/") | ||||
| set(CMAKE_SOURCE_DIR "${CMAKE_BINARY_DIR}/../") | ||||
|  | ||||
| # ------------ | ||||
| # Dependencies | ||||
| @@ -22,17 +23,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) | ||||
|     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") # for MinGW-w64 | ||||
| endif() | ||||
|  | ||||
| # ------------ | ||||
| # Source files | ||||
| # ------------ | ||||
| set(CMAKE_SOURCE_DIR "${CMAKE_BINARY_DIR}/../") | ||||
| file(GLOB_RECURSE common_sources "${CMAKE_SOURCE_DIR}/src/*.cc") | ||||
| file(GLOB_RECURSE common_headers "${CMAKE_SOURCE_DIR}/src/*.h") | ||||
| file(GLOB_RECURSE test_sources "${CMAKE_SOURCE_DIR}/tests/*.cc") | ||||
| file(GLOB_RECURSE test_headers "${CMAKE_SOURCE_DIR}/tests/*.h") | ||||
| list(REMOVE_ITEM common_sources "${CMAKE_SOURCE_DIR}/src/main.cc") | ||||
| list(REMOVE_ITEM test_sources "${CMAKE_SOURCE_DIR}/tests/main.cc") | ||||
|  | ||||
| # ------- | ||||
| # Version | ||||
| # ------- | ||||
| @@ -42,8 +32,17 @@ if("${VERSION_SHORT}" STREQUAL "") | ||||
|     set(VERSION_SHORT "0.0") | ||||
|     set(VERSION_LONG "?") | ||||
| endif() | ||||
| configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" "${CMAKE_BINARY_DIR}/generated/version.h" @ONLY) | ||||
| include_directories(${CMAKE_BINARY_DIR}/generated) | ||||
| configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" "${CMAKE_SOURCE_DIR}/src/version.h" @ONLY) | ||||
|  | ||||
| # ------------ | ||||
| # Source files | ||||
| # ------------ | ||||
| file(GLOB_RECURSE common_sources "${CMAKE_SOURCE_DIR}/src/*.cc") | ||||
| file(GLOB_RECURSE common_headers "${CMAKE_SOURCE_DIR}/src/*.h") | ||||
| file(GLOB_RECURSE test_sources "${CMAKE_SOURCE_DIR}/tests/*.cc") | ||||
| file(GLOB_RECURSE test_headers "${CMAKE_SOURCE_DIR}/tests/*.h") | ||||
| list(REMOVE_ITEM common_sources "${CMAKE_SOURCE_DIR}/src/main.cc") | ||||
| list(REMOVE_ITEM test_sources "${CMAKE_SOURCE_DIR}/tests/main.cc") | ||||
|  | ||||
| # ------------------- | ||||
| # 3rd party libraries | ||||
|   | ||||
		Reference in New Issue
	
	Block a user