File tree Expand file tree Collapse file tree 5 files changed +26
-11
lines changed Expand file tree Collapse file tree 5 files changed +26
-11
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,11 @@ SET (ENABLE_TESTS TRUE CACHE BOOL "Build unit tests?")
125
125
# if set to other directory than expected
126
126
MARK_AS_ADVANCED (LIBRARY_OUTPUT_PATH )
127
127
128
+ IF (MSVC AND CMAKE_GENERATOR MATCHES "NMake" )
129
+ # following variable is also used in qgsconfig.h
130
+ SET (USING_NMAKE TRUE )
131
+ ENDIF (MSVC AND CMAKE_GENERATOR MATCHES "NMake" )
132
+
128
133
#############################################################
129
134
# check if lexer and parser are not missing
130
135
# http://www.mail-archive.com/cmake@cmake.org/msg02861.html
@@ -295,7 +300,9 @@ FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
295
300
IF (PEDANTIC )
296
301
MESSAGE (STATUS "Pedantic compiler settings enabled" )
297
302
IF (MSVC )
298
- ADD_DEFINITIONS ( /W4 )
303
+ IF (NOT USING_NMAKE )
304
+ ADD_DEFINITIONS ( /W4 )
305
+ ENDIF (NOT USING_NMAKE )
299
306
300
307
# disable warnings
301
308
ADD_DEFINITIONS ( /wd4100 ) # unused formal parameters
@@ -372,8 +379,10 @@ IF (WIN32)
372
379
ADD_DEFINITIONS (-D_CRT_NONSTDC_NO_WARNINGS )
373
380
374
381
IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo )
375
- MESSAGE (STATUS "Generating browse files" )
376
- ADD_DEFINITIONS ( /FR )
382
+ IF (NOT USING_NMAKE )
383
+ MESSAGE (STATUS "Generating browse files" )
384
+ ADD_DEFINITIONS ( /FR )
385
+ ENDIF (NOT USING_NMAKE )
377
386
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo )
378
387
379
388
IF (INSTALL_DEPS )
Original file line number Diff line number Diff line change 32
32
//used by Mac to find system Qt plugins when bundle is run from build directory
33
33
#define QTPLUGINSDIR "${QT_PLUGINS_DIR}"
34
34
35
+ #cmakedefine USING_NMAKE
36
+
35
37
#cmakedefine HAVE_POSTGRESQL
36
38
37
39
#cmakedefine HAVE_SPATIALITE
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ void QgsApplication::init( QString customConfigPath )
118
118
{
119
119
// we run from source directory - not installed to destination (specified prefix)
120
120
ABISYM ( mPrefixPath ) = QString (); // set invalid path
121
- #ifdef _MSC_VER
121
+ #if defined( _MSC_VER) && ! defined(USING_NMAKE)
122
122
setPluginPath ( ABISYM ( mBuildOutputPath ) + " /" + QString ( QGIS_PLUGIN_SUBDIR ) + " /" + ABISYM ( mCfgIntDir ) );
123
123
#else
124
124
setPluginPath ( ABISYM ( mBuildOutputPath ) + " /" + QString ( QGIS_PLUGIN_SUBDIR ) );
Original file line number Diff line number Diff line change @@ -12,17 +12,17 @@ TARGET_LINK_LIBRARIES(crssync
12
12
${GDAL_LIBRARY}
13
13
)
14
14
15
- IF (MSVC )
15
+ IF (MSVC AND NOT USING_NMAKE )
16
16
ADD_CUSTOM_TARGET (synccrsdb
17
17
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /${CMAKE_CFG_INTDIR}/crssync.exe
18
18
DEPENDS crssync
19
19
)
20
- ELSE (MSVC )
20
+ ELSE (MSVC AND NOT USING_NMAKE )
21
21
ADD_CUSTOM_TARGET (synccrsdb
22
22
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /crssync
23
23
DEPENDS crssync
24
24
)
25
- ENDIF (MSVC )
25
+ ENDIF (MSVC AND NOT USING_NMAKE )
26
26
27
27
INSTALL (CODE "MESSAGE(\" Installing crssync ...\" )" )
28
28
INSTALL (TARGETS crssync RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR} )
Original file line number Diff line number Diff line change @@ -41,14 +41,18 @@ int main( int argc, char ** argv )
41
41
{
42
42
context = argv[1 ];
43
43
}
44
+
45
+ if ( !QgsApplication::isRunningFromBuildDir () )
46
+ {
44
47
#if defined(Q_WS_MACX)
45
- // If we're on Mac, we have the resource library way above us...
46
- a.setPkgDataPath ( QgsApplication::prefixPath () + " /../../../../" + QString ( QGIS_DATA_SUBDIR ) );
48
+ // If we're on Mac, we have the resource library way above us...
49
+ a.setPkgDataPath ( QgsApplication::prefixPath () + " /../../../../" + QString ( QGIS_DATA_SUBDIR ) );
47
50
#elif defined(Q_WS_WIN)
48
- a.setPkgDataPath ( QgsApplication::prefixPath () + " /" QGIS_DATA_SUBDIR );
51
+ a.setPkgDataPath ( QgsApplication::prefixPath () + " /" QGIS_DATA_SUBDIR );
49
52
#else
50
- a.setPkgDataPath ( QgsApplication::prefixPath () + " /../" QGIS_DATA_SUBDIR );
53
+ a.setPkgDataPath ( QgsApplication::prefixPath () + " /../" QGIS_DATA_SUBDIR );
51
54
#endif
55
+ }
52
56
53
57
QString i18nPath = QgsApplication::i18nPath ();
54
58
if ( myTranslationCode.isEmpty () )
You can’t perform that action at this time.
0 commit comments