-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
67 lines (55 loc) · 1.54 KB
/
CMakeLists.txt
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 3.0)
#set (CMAKE_BUILD_TYPE Release)
set (BUILD_SHARED_LIBS TRUE)
set (CMAKE_INSTALL_PREFIX .)
project(Wizium)
include_directories (.)
add_library (libWizium
SHARED
library.cpp
library.h
library.Module.cpp
library.Module.h
libWizium.cpp
libWizium.h
Dictionary/Dictionary.cpp
Dictionary/Dictionary.h
Grid/Box.cpp
Grid/Box.h
Grid/Grid.cpp
Grid/Grid.h
Solvers/SolverDynamic.cpp
Solvers/SolverDynamic.h
Solvers/SolverDynamic.DynamicItem.cpp
Solvers/SolverDynamic.DynamicItem.h
Solvers/SolverStatic.cpp
Solvers/SolverStatic.h
Solvers/SolverStatic.StaticItem.cpp
Solvers/SolverStatic.StaticItem.h
Solvers/ISolver.h
)
set_property(TARGET libWizium PROPERTY CXX_STANDARD 17)
if (APPLE)
message (STATUS "Darwin configuration")
target_compile_options(libWizium PRIVATE -Wall -Wextra)
set (PATH ./../Binaries/Darwin/)
elseif (UNIX)
message (STATUS "Unix configuration")
target_compile_options(libWizium PRIVATE -Wall -Wextra)
set (PATH ./../Binaries/Linux/)
set_target_properties(libWizium PROPERTIES PREFIX "")
elseif (MSVC)
message (STATUS "Microsoft Visual Studio configuration")
target_compile_options(libWizium PRIVATE /W3 /O2 /Oi /GL /Gy)
target_compile_definitions(libWizium PRIVATE LIBWIZIUM_EXPORTS)
if (${CMAKE_GENERATOR_PLATFORM} STREQUAL x64)
set (PATH ./../Binaries/Windows/x64/)
target_link_options(libWizium PRIVATE /MACHINE:X64)
else ()
set (PATH ./../Binaries/Windows/x86/)
endif ()
else ()
message (STATUS "Default configuration")
endif ()
install (TARGETS libWizium
DESTINATION ${PATH})