-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enhance ModelConfig to be more powerful * Empty-Commit * Incremented patch version * Test Python support * Fix compile error * Update library * Misc * Update Python version * Update directory * Should work. Hopefully * Enable Python in test install * Turn on FOEDAG_WITH_PYTHON * Why msys2 still failed * Deal with symbol array [] if contrains is read from file * Another try * Misc * Misc * Add debug * Suspect the issue, use hardcode method to confirm * Hardcode for testing * Use action * Revert * Mistake * DLL for MSCV only * Should work now * Should work now * Confuse * Simplify --------- Co-authored-by: chungshien-chai <[email protected]> Co-authored-by: alaindargelas <[email protected]>
- Loading branch information
1 parent
cf30c38
commit 02f26ae
Showing
35 changed files
with
2,341 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# - Try to find the freetype library | ||
# Once done this defines | ||
# | ||
# Python3_LIBRARIES - fullpath of the python3 library | ||
# Python3_INCLUDE_DIRS - include folder of python3 | ||
# Python3_RUNTIME_LIBRARY_DIRS - bin folder of python3 | ||
# Python3_EXECUTABLE - exe of python3 | ||
# Python3_FOUND - set when all four are found | ||
|
||
# Work for msys2 only | ||
|
||
# Copyright (c) 2024 Chai, Chung Shien | ||
# | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. | ||
message("FindCustomPython3 MINGW: ${MINGW}") | ||
message("FindCustomPython3 MSVC: ${MSVC}") | ||
message("FindCustomPython3 WIN32: ${WIN32}") | ||
set(PYTHON3_FIND_PATH "C:/msys64/mingw64") | ||
if ((MINGW OR (NOT MSVC AND WIN32)) AND EXISTS ${PYTHON3_FIND_PATH}) | ||
file(GLOB potential_python3_libs "${PYTHON3_FIND_PATH}/lib/libpython3.*.dll.a") | ||
if (potential_python3_libs) | ||
list (GET potential_python3_libs 0 Python3_LIBRARIES) | ||
if (Python3_LIBRARIES AND EXISTS ${Python3_LIBRARIES}) | ||
get_filename_component(python3_filename ${Python3_LIBRARIES} NAME) | ||
string(REGEX REPLACE "libpython" "python" python3_filename ${python3_filename}) | ||
string(REGEX REPLACE ".dll.a" "" python3_filename ${python3_filename}) | ||
set(Python3_INCLUDE_DIRS ${PYTHON3_FIND_PATH}/include/${python3_filename}) | ||
set(Python3_RUNTIME_LIBRARY_DIRS ${PYTHON3_FIND_PATH}/bin) | ||
set(Python3_EXECUTABLE ${Python3_RUNTIME_LIBRARY_DIRS}/${python3_filename}.exe) | ||
if (Python3_INCLUDE_DIRS AND EXISTS ${Python3_INCLUDE_DIRS}) | ||
if (Python3_RUNTIME_LIBRARY_DIRS AND EXISTS ${Python3_RUNTIME_LIBRARY_DIRS}) | ||
if (Python3_EXECUTABLE AND EXISTS ${Python3_EXECUTABLE}) | ||
set(Python3_FOUND TRUE) | ||
else() | ||
message(SEND_ERROR "${Python3_EXECUTABLE} does not exist") | ||
endif() | ||
else() | ||
message(SEND_ERROR "${Python3_RUNTIME_LIBRARY_DIRS} does not exist") | ||
endif() | ||
else() | ||
message(SEND_ERROR "${Python3_INCLUDE_DIRS} does not exist") | ||
endif() | ||
else() | ||
message(SEND_ERROR "Fail to look for libpython3.*.dll.a in ${PYTHON3_FIND_PATH}/lib") | ||
endif() | ||
else() | ||
message(SEND_ERROR "Fail to look for libpython3.*.dll.a in ${PYTHON3_FIND_PATH}/lib") | ||
endif() | ||
else() | ||
find_package(Python3 3.3 REQUIRED COMPONENTS Interpreter Development) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.