CMakeLists.txt 1.14 KB
Newer Older
Tobias WEBER's avatar
Tobias WEBER committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# @author Tobias Weber
# @date dec-2018
# @license GPLv3, see 'LICENSE' file
#

cmake_minimum_required(VERSION 3.0)
project(cif2xml)


set(CMAKE_VERBOSE_MAKEFILE TRUE)

find_package(Boost REQUIRED)


Tobias WEBER's avatar
Tobias WEBER committed
16
17
set(CMAKE_CXX_STANDARD 20)
add_definitions(-std=c++20)
Tobias WEBER's avatar
Tobias WEBER committed
18
19
20
21
22
23
24
25
26
27
add_definitions(${Boost_CXX_FLAGS})


include_directories(
	"${PROJECT_SOURCE_DIR}" "${Boost_INCLUDE_DIRS}/.." "../.."
	"../../ext/gemmi/include" "../../ext/gemmi/third_party"
	"ext" "ext/gemmi/include" "ext/gemmi/third_party"
)


Tobias WEBER's avatar
Tobias WEBER committed
28
add_executable(takin_cif2xml
Tobias WEBER's avatar
Tobias WEBER committed
29
	cif2xml.cpp ../structfact/loadcif.h)
Tobias WEBER's avatar
Tobias WEBER committed
30
target_link_libraries(takin_cif2xml
Tobias WEBER's avatar
Tobias WEBER committed
31
32
#	-static-libstdc++ -static-libgcc
)
Tobias WEBER's avatar
Tobias WEBER committed
33
34


Tobias WEBER's avatar
Tobias WEBER committed
35
add_executable(takin_findsg
Tobias WEBER's avatar
Tobias WEBER committed
36
	findsg.cpp ../structfact/loadcif.h)
Tobias WEBER's avatar
Tobias WEBER committed
37
target_link_libraries(takin_findsg)
38
39
40
41
42


if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
	target_link_options(takin_cif2xml
		# create an __info_plist section in the binary
Tobias WEBER's avatar
Tobias WEBER committed
43
		PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${PROJECT_SOURCE_DIR}/../../setup_mac/InfoCif2Xml.plist
44
45
46
47
	)

	target_link_options(takin_findsg
		# create an __info_plist section in the binary
Tobias WEBER's avatar
Tobias WEBER committed
48
		PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${PROJECT_SOURCE_DIR}/../../setup_mac/InfoFindSG.plist
49
50
	)
endif()