CMakeLists.txt 660 Bytes
Newer Older
Bastian Krayer's avatar
Bastian Krayer committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 3.10)

project(CG3)

LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0") 
	# Allows find scripts to automatically search in environment variables LIBNAME_ROOT
	cmake_policy(SET CMP0074 NEW)
ENDIF()

# Determine if 64 Bit build
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
	SET(BUILD_TYPE_64_BIT true)
endif()

if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
   SET(BUILD_TYPE_64_BIT true)
endif()

if(CMAKE_CL_64)
   SET(BUILD_TYPE_64_BIT true)
endif()


IF(BUILD_TYPE_64_BIT)
	  set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
ENDIF()

include(ProjectSetup)