Skip to content

Commit 1261a46

Browse files
committed
Fixed including AsmJit in CMake
1 parent f2f2683 commit 1261a46

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
2-
3-
cmake_policy(PUSH)
4-
cmake_policy(SET CMP0063 NEW) # Honor visibility properties.
1+
cmake_minimum_required(VERSION 3.31 FATAL_ERROR)
52

63
# Don't create a project if it was already created by another CMakeLists.txt.
74
# This allows one library to embed another library without making a collision.
@@ -69,7 +66,7 @@ set(ASMTK_PRIVATE_CFLAGS_DBG "") # Private compiler flags used b
6966
set(ASMTK_PRIVATE_CFLAGS_REL "") # Private compiler flags used by release builds.
7067

7168
if (NOT ASMTK_NO_CUSTOM_FLAGS)
72-
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
69+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
7370
list(APPEND ASMTK_PRIVATE_CFLAGS
7471
-MP # [+] Multi-Process Compilation.
7572
-GR- # [-] Runtime type information.
@@ -109,7 +106,7 @@ endif()
109106
if (ASMJIT_EXTERNAL)
110107
find_package(asmjit CONFIG REQUIRED)
111108
else()
112-
include("${ASMJIT_DIR}/CMakeLists.txt")
109+
add_subdirectory("${ASMJIT_DIR}" asmjit)
113110
list(APPEND ASMTK_PRIVATE_CFLAGS ${ASMJIT_CFLAGS})
114111
list(REMOVE_DUPLICATES ASMTK_PRIVATE_CFLAGS)
115112
endif()
@@ -224,5 +221,3 @@ if (NOT ASMTK_EMBED)
224221
endforeach()
225222
endif()
226223
endif()
227-
228-
cmake_policy(POP)

tools/configure-makefiles.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ if [ -n "${ASMJIT_DIR}" ]; then
88
BUILD_OPTIONS="${BUILD_OPTIONS} -DASMJIT_DIR=\"${ASMJIT_DIR}\""
99
fi
1010

11-
echo "== [Configuring Build - Debug] =="
11+
echo "== [configure debug] =="
1212
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}/Debug" -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS}
1313
echo ""
1414

15-
echo "== [Configuring Build - Release] =="
15+
echo "== [configure release] =="
1616
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}/Release" -DCMAKE_BUILD_TYPE=Release ${BUILD_OPTIONS}
1717
echo ""

0 commit comments

Comments
 (0)