1
1
# Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
2
- #
3
- #
4
- #
5
- #
6
- #
7
- #
8
- #
9
- #
10
- #
11
- #
12
- #
13
- #
14
- #
15
- #
16
- #
17
- #
18
- #
19
- #
20
- #
21
- # The lines above are intentionally left blank
2
+ #
3
+ # This program is free software; you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License, version 2.0,
5
+ # as published by the Free Software Foundation.
6
+ #
7
+ # This program is also distributed with certain software (including
8
+ # but not limited to OpenSSL) that is licensed under separate terms,
9
+ # as designated in a particular file or component or in included license
10
+ # documentation. The authors of MySQL hereby grant you an additional
11
+ # permission to link the program and your derivative works with the
12
+ # separately licensed software that they have included with MySQL.
13
+ #
14
+ # This program is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ # GNU General Public License, version 2.0, for more details.
18
+ #
19
+ # You should have received a copy of the GNU General Public License
20
+ # along with this program; if not, write to the Free Software
21
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
22
23
23
#-------------- FIND WIX_DIR ------------------
24
- IF (DEFINED $ENV{WIX_DIR} )
25
- SET (WIX_DIR "$ENV{WIX_DIR} " )
26
- ELSE ()
27
- SET (WIX_DIR "$ENV{USERPROFILE} \\ .dotnet\\ tools" )
28
- ENDIF (DEFINED $ENV{WIX_DIR} )
24
+ # First check if WIX_DIR was given in the command line
25
+ IF (NOT DEFINED WIX_DIR )
26
+ # If WIX_DIR is not given in command line check env
27
+ IF (DEFINED $ENV{WIX_DIR} )
28
+ SET (WIX_DIR "$ENV{WIX_DIR} " )
29
+ ELSE ()
30
+ SET (WIX_DIR "$ENV{USERPROFILE} \\ .dotnet\\ tools" )
31
+ ENDIF (DEFINED $ENV{WIX_DIR} )
32
+ ENDIF (NOT DEFINED WIX_DIR )
29
33
30
34
#----------------- FIND WIX EXECUTABLE -------------------
31
- IF (EXISTS "${WIX_DIR} \\ wix.exe" )
32
- MESSAGE (STATUS "Wix found in ${WIX_DIR} " )
35
+ FIND_PROGRAM (WIX_EXECUTABLE wix ${WIX_DIR} )
36
+
37
+ IF (EXISTS ${WIX_EXECUTABLE} )
38
+ MESSAGE (STATUS "Wix found in ${WIX_DIR} " )
33
39
ELSE ()
34
- IF ($ENV{WIX_DIR} )
35
- MESSAGE (FATAL_ERROR "Cannot find Wix in $ENV{WIX_DIR} " )
36
- ELSE ($ENV{WIX_DIR} )
37
- MESSAGE (FATAL_ERROR "Cannot find Wix in ${WIX_DIR} . Please set environment variable WIX_DIR which points to the wix installation directory" )
38
- ENDIF ($ENV{WIX_DIR} )
40
+ IF ($ENV{WIX_DIR} )
41
+ MESSAGE (FATAL_ERROR "Cannot find Wix in $ENV{WIX_DIR} " )
42
+ ELSE ($ENV{WIX_DIR} )
43
+ MESSAGE (FATAL_ERROR "Cannot find Wix in ${WIX_DIR} . Please set environment variable WIX_DIR which points to the wix installation directory" )
44
+ ENDIF ($ENV{WIX_DIR} )
39
45
ENDIF ()
40
46
41
- FIND_PROGRAM (WIX_EXECUTABLE wix ${WIX_DIR} )
0 commit comments