[cmake] provide default project version

each subproject inherits the project version of the top level project
This commit is contained in:
Armin Novak
2023-12-21 17:24:43 +01:00
committed by akallabeth
parent 4aad6e9d42
commit 7f25a7cebf
12 changed files with 113 additions and 16 deletions

View File

@@ -14,7 +14,18 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
project(iFreeRDP)
cmake_minimum_required(VERSION 3.13)
if (NOT FREERDP_DEFAULT_PROJECT_VERSION)
set(FREERDP_DEFAULT_PROJECT_VERSION "1.0.0.0")
endif()
project(iFreeRDP
VERSION ${FREERDP_DEFAULT_PROJECT_VERSION}
)
message("project ${PROJECT_NAME} is using version ${PROJECT_VERSION}")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "project default" FORCE)