File tree 4 files changed +22
-20
lines changed
4 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 9
9
# See LICENSE.txt for the full license.
10
10
#
11
11
cmake_minimum_required (VERSION 3.15)
12
- set (CMAKE_INCLUDE_CURRENT_DIR ON )
12
+ include (version .cmake)
13
+ project (jabs
14
+ VERSION "${BUILD_VERSION} "
15
+ DESCRIPTION "Jaakko's Backscattering Simulator (JaBS)"
16
+ LANGUAGES C
17
+ )
18
+
13
19
if (WIN32 AND DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
14
20
set (CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT} /scripts/buildsystems/vcpkg.cmake"
15
21
CACHE STRING "" )
@@ -20,15 +26,16 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
20
26
set (CMAKE_BUILD_TYPE Release)
21
27
endif ()
22
28
23
- add_subdirectory (gitwatcher)
24
29
25
- include (version .cmake)
30
+ option (DEBUG_MODE_ENABLE "Enable debug mode" OFF )
31
+ if (DEBUG_MODE_ENABLE)
32
+ if (MSVC )
33
+ add_compile_options (/W4 /WX /DDEBUG)
34
+ else ()
35
+ add_compile_options (-Wall -Wextra -pedantic -DDEBUG)
36
+ endif ()
37
+ endif ()
26
38
27
- project (jabs
28
- VERSION "${BUILD_VERSION} "
29
- DESCRIPTION "Jaakko's Backscattering Simulator (JaBS)"
30
- LANGUAGES C
31
- )
32
- set (CMAKE_C_STANDARD 99)
39
+ add_subdirectory (gitwatcher)
33
40
34
41
add_subdirectory (src)
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ set QT6_DIR=C:\Qt\6.1.2
6
6
REM And vcpkg
7
7
set VCPKG_DIR = C:\vcpkg
8
8
REM Try to remove CMakeCache.txt files if your configuration (e.g. compiler) changes or you want to do a fresh build
9
-
9
+ cd ..
10
10
mkdir build
11
11
cd build
12
12
REM del CMakeCache.txt
@@ -22,7 +22,7 @@ cmake -DCMAKE_PREFIX_PATH="%QT6_DIR%\msvc2019_64\lib\cmake" -G "Visual Studio 16
22
22
cmake --build . --target ALL_BUILD --config Release
23
23
REM Windeployqt will handle most dlls and other Qt dependencies
24
24
%QT6_DIR% \msvc2019_64\bin\windeployqt.exe Release
25
- copy ..\..\build\Release\jabs.exe Release
25
+ copy ..\..\build\src\ Release\jabs.exe Release
26
26
copy " %JIBAL_DIR% \bin\*.dll" Release
27
27
del Release\jibal.conf
28
28
(
Original file line number Diff line number Diff line change 9
9
# See LICENSE.txt for the full license.
10
10
#
11
11
12
+ set (CMAKE_INCLUDE_CURRENT_DIR ON )
13
+ set (CMAKE_C_STANDARD 99)
14
+
12
15
configure_file (version .h.in version .h @ONLY)
13
16
find_package (GSL 2.6 REQUIRED)
14
17
find_package (Jibal 0.3.7 REQUIRED)
@@ -18,15 +21,6 @@ if(WIN32)
18
21
find_library (GETOPT_LIBRARY getopt)
19
22
endif ()
20
23
21
- option (DEBUG_MODE_ENABLE "Enable debug mode" OFF )
22
- if (DEBUG_MODE_ENABLE)
23
- if (MSVC )
24
- add_compile_options (/W4 /WX /DDEBUG)
25
- else ()
26
- add_compile_options (-Wall -Wextra -pedantic -DDEBUG)
27
- endif ()
28
- endif ()
29
-
30
24
add_executable (jabs main.c sample.c sample.h brick.c ion.c ion.h simulation.c simulation.h reaction.c reaction.h
31
25
options .c options .h spectrum.c spectrum.h fit.c fit.h rotate.c rotate.h detector.c detector.h jabs.c jabs.h
32
26
roughness.c roughness.h script.c script.h generic.c generic.h message.c message.h aperture.c aperture.h
Original file line number Diff line number Diff line change 1
1
#Read version from file
2
2
file (READ "${CMAKE_CURRENT_LIST_DIR} /version.txt" BUILD_VERSION)
3
3
string (STRIP "${BUILD_VERSION} " BUILD_VERSION)
4
+ message (STATUS "JaBS version is ${BUILD_VERSION} " )
You can’t perform that action at this time.
0 commit comments