CMakeLists.txt 2.03 KB
Newer Older
Tobias WEBER's avatar
Tobias WEBER committed
1
2
3
4
5
#
# @author Tobias Weber
# @date dec-2018
# @license GPLv3, see 'LICENSE' file
#
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# ----------------------------------------------------------------------------
# mag-core (part of the Takin software suite)
# Copyright (C) 2018-2021  Tobias WEBER (Institut Laue-Langevin (ILL),
#                          Grenoble, France).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# ----------------------------------------------------------------------------
#
Tobias WEBER's avatar
Tobias WEBER committed
24
25
26
27
28
29
30
31
32
33

cmake_minimum_required(VERSION 3.0)
project(cif2xml)


set(CMAKE_VERBOSE_MAKEFILE TRUE)

find_package(Boost REQUIRED)


Tobias WEBER's avatar
Tobias WEBER committed
34
35
set(CMAKE_CXX_STANDARD 20)
add_definitions(-std=c++20)
Tobias WEBER's avatar
Tobias WEBER committed
36
37
38
39
40
41
42
43
44
45
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
46
add_executable(takin_cif2xml
Tobias WEBER's avatar
Tobias WEBER committed
47
	cif2xml.cpp ../structfact/loadcif.h)
Tobias WEBER's avatar
Tobias WEBER committed
48
target_link_libraries(takin_cif2xml
Tobias WEBER's avatar
Tobias WEBER committed
49
50
#	-static-libstdc++ -static-libgcc
)
Tobias WEBER's avatar
Tobias WEBER committed
51
52


Tobias WEBER's avatar
Tobias WEBER committed
53
add_executable(takin_findsg
Tobias WEBER's avatar
Tobias WEBER committed
54
	findsg.cpp ../structfact/loadcif.h)
Tobias WEBER's avatar
Tobias WEBER committed
55
target_link_libraries(takin_findsg)
56
57
58
59
60


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
61
		PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${PROJECT_SOURCE_DIR}/../../setup_mac/InfoCif2Xml.plist
62
63
64
65
	)

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