12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- cmake_minimum_required(VERSION 3.0)
- project(BLpython3 VERSION 0.0.3)
- set(CMAKE_CXX_FLAGS "-static -static-libgcc -static-libstdc++")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2 -DTSFUNCS_DEBUG=false")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -Og")
- add_definitions(-DPROJECT_NAME="${CMAKE_PROJECT_NAME}")
- add_definitions(-DPROJECT_EXPORT=${CMAKE_PROJECT_NAME})
- add_definitions(-DPROJECT_VERSION="${CMAKE_PROJECT_VERSION}")
- set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
- make_directory("${PROJECT_SOURCE_DIR}/generated")
- execute_process(
- INPUT_FILE "${PROJECT_SOURCE_DIR}/srcPython/bootstrap.py"
- COMMAND xxd "-i"
- OUTPUT_FILE "${PROJECT_SOURCE_DIR}/generated/include-bootstrap.py"
- )
- execute_process(
- INPUT_FILE "${PROJECT_SOURCE_DIR}/srcPython/test.py"
- COMMAND xxd "-i"
- OUTPUT_FILE "${PROJECT_SOURCE_DIR}/generated/include-test.py"
- )
- include_directories("include/" "generated/" "src/" "srcPython/")
- add_library(${CMAKE_PROJECT_NAME} SHARED
- src/main.cpp
- )
- set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES PREFIX "")
- target_link_libraries(${CMAKE_PROJECT_NAME}
- psapi
- shlwapi
- )
- set(EXECUTABLE_OUTPUT_PATH ${dir}release)
- set(LIBRARY_OUTPUT_PATH ${dir}release)
|