Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 1114ee05 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

CMAKE: Add build definitions needed by lektor with cmake

parent bfde70df
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!168Build system change to CMAKE
...@@ -37,6 +37,7 @@ endif() ...@@ -37,6 +37,7 @@ endif()
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
message("You are building on Linux, FreeBSD or any other toaster OS") message("You are building on Linux, FreeBSD or any other toaster OS")
endif() endif()
message("Building lektor on ${CMAKE_SYSTEM_PROCESSOR}")
# Find dependencies # Find dependencies
find_library(MPV_LIBRARY mpv REQUIRED) find_library(MPV_LIBRARY mpv REQUIRED)
...@@ -113,17 +114,28 @@ set(common_HEADERS ...@@ -113,17 +114,28 @@ set(common_HEADERS
<sys/time.h> <sys/time.h>
) )
set(common_DEFINITIONS
LKT_ARCH="${CMAKE_SYSTEM_PROCESSOR}"
LKT_MAN_BINARY="${MAN}"
CMAKE_BUILD=1
)
add_executable(lektord ${lektord_SOURCES}) add_executable(lektord ${lektord_SOURCES})
#add_executable(lkt ${lkt_SOURCES}) #add_executable(lkt ${lkt_SOURCES})
target_link_libraries(lektord PRIVATE ${MPV_LIBRARY}) target_link_libraries(lektord PRIVATE ${MPV_LIBRARY})
target_link_libraries(lektord PRIVATE ${SQLITE3_LIBRARY}) target_link_libraries(lektord PRIVATE ${SQLITE3_LIBRARY})
target_include_directories(lektord PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc) target_include_directories(lektord PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc)
#target_include_directories(lkt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc) #target_include_directories(lkt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc)
target_compile_options(lektord PRIVATE ${COMMON_C_FLAGS}) target_compile_options(lektord PRIVATE ${COMMON_C_FLAGS})
#target_compile_options(lkt PRIVATE ${COMMON_C_FLAGS}) #target_compile_options(lkt PRIVATE ${COMMON_C_FLAGS})
target_link_libraries(lektord PRIVATE -fopenmp) target_link_libraries(lektord PRIVATE -fopenmp)
target_compile_definitions(lektord PRIVATE CMAKE_BUILD=1)
#target_compile_definitions(lkt PRIVATE CMAKE_BUILD=1) target_compile_definitions(lektord PRIVATE ${common_DEFINITIONS})
#target_compile_definitions(lkt PRIVATE ${common_DEFINITIONS})
target_precompile_headers(lektord PRIVATE ${common_HEADERS}) target_precompile_headers(lektord PRIVATE ${common_HEADERS})
#target_precompile_headers(lkt PRIVATE ${common_HEADERS}) #target_precompile_headers(lkt PRIVATE ${common_HEADERS})
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter