mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 05:21:29 +07:00
[project] better 64-bit target detection in Windows helpers' CMake files
This commit is contained in:
4
native/IdeaWin32/.gitignore
vendored
Normal file
4
native/IdeaWin32/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/.idea/
|
||||
/cmake-build-*/
|
||||
/build32/
|
||||
/build64/
|
||||
@@ -1,5 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(IdeaWin32)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
if(NOT WIN32)
|
||||
message(FATAL_ERROR "Windows only.")
|
||||
@@ -13,13 +14,17 @@ endif()
|
||||
|
||||
string(TIMESTAMP YEAR "%Y")
|
||||
|
||||
if(CMAKE_GENERATOR_PLATFORM STREQUAL "x64")
|
||||
check_symbol_exists("_M_AMD64" "" TARGET_X64)
|
||||
if(TARGET_X64)
|
||||
set(FILE_NAME "IdeaWin64")
|
||||
set(JAVA_HOME $ENV{JDK_18_x64})
|
||||
else()
|
||||
set(FILE_NAME "IdeaWin32")
|
||||
set(JAVA_HOME $ENV{JDK_18})
|
||||
endif()
|
||||
if(NOT JAVA_HOME)
|
||||
message(FATAL_ERROR "JDK_18/JDK_18_x64 variables not defined (x64=${TARGET_X64}).")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
|
||||
include_directories(${JAVA_HOME}/include ${JAVA_HOME}/include/win32)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(WinFsNotifier)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
if(NOT WIN32)
|
||||
message(FATAL_ERROR "Windows only.")
|
||||
@@ -13,7 +14,8 @@ endif()
|
||||
|
||||
string(TIMESTAMP YEAR "%Y")
|
||||
|
||||
if(CMAKE_GENERATOR_PLATFORM STREQUAL "x64")
|
||||
check_symbol_exists("_M_AMD64" "" TARGET_X64)
|
||||
if(TARGET_X64)
|
||||
set(FILE_NAME "fsnotifier64")
|
||||
else()
|
||||
set(FILE_NAME "fsnotifier")
|
||||
|
||||
Reference in New Issue
Block a user